Skip to content

Commit 33bd91f

Browse files
hormsmstsirkin
authored andcommitted
virtio: Add missing documentation for structure fields
Add missing documentation for the vqs_list_lock field of struct virtio_device, and the validate field of struct virtio_driver. ./scripts/kernel-doc says: .../virtio.h:131: warning: Function parameter or member 'vqs_list_lock' not described in 'virtio_device' .../virtio.h:192: warning: Function parameter or member 'validate' not described in 'virtio_driver' 2 warnings as Errors No functional changes intended. Signed-off-by: Simon Horman <horms@kernel.org> Message-Id: <20230510-virtio-kdoc-v3-1-e2681ed7a425@kernel.org> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
1 parent 9a8864d commit 33bd91f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

include/linux/virtio.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ int virtqueue_resize(struct virtqueue *vq, u32 num,
103103
* @config_enabled: configuration change reporting enabled
104104
* @config_change_pending: configuration change reported while disabled
105105
* @config_lock: protects configuration change reporting
106+
* @vqs_list_lock: protects @vqs.
106107
* @dev: underlying device.
107108
* @id: the device type identification (used to match it with a driver).
108109
* @config: the configuration ops for this device.
@@ -117,7 +118,7 @@ struct virtio_device {
117118
bool config_enabled;
118119
bool config_change_pending;
119120
spinlock_t config_lock;
120-
spinlock_t vqs_list_lock; /* Protects VQs list access */
121+
spinlock_t vqs_list_lock;
121122
struct device dev;
122123
struct virtio_device_id id;
123124
const struct virtio_config_ops *config;
@@ -160,6 +161,8 @@ size_t virtio_max_dma_size(const struct virtio_device *vdev);
160161
* @feature_table_size: number of entries in the feature table array.
161162
* @feature_table_legacy: same as feature_table but when working in legacy mode.
162163
* @feature_table_size_legacy: number of entries in feature table legacy array.
164+
* @validate: the function to call to validate features and config space.
165+
* Returns 0 or -errno.
163166
* @probe: the function to call when a device is found. Returns 0 or -errno.
164167
* @scan: optional function to call after successful probe; intended
165168
* for virtio-scsi to invoke a scan.

0 commit comments

Comments
 (0)