Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

vringh: address kdoc warnings

Address some minor kdoc warnings in vring.h.
* Place kdoc for 'struct vringh_config_ops' immediately before the structure
* Add missing documentation of members of 'vringh_iov' and 'vringh_kiov'

Warnings flagged by:
$ ./scripts/kernel-doc -none include/linux/vringh.h
include/linux/vringh.h:68: error: Cannot parse struct or union!
include/linux/vringh.h:92: warning: Function parameter or member 'iov' not described in 'vringh_iov'
include/linux/vringh.h:92: warning: Function parameter or member 'consumed' not described in 'vringh_iov'
include/linux/vringh.h:92: warning: Function parameter or member 'i' not described in 'vringh_iov'
include/linux/vringh.h:92: warning: Function parameter or member 'used' not described in 'vringh_iov'
include/linux/vringh.h:92: warning: Function parameter or member 'max_num' not described in 'vringh_iov'
include/linux/vringh.h:104: warning: Function parameter or member 'iov' not described in 'vringh_kiov'
include/linux/vringh.h:104: warning: Function parameter or member 'consumed' not described in 'vringh_kiov'
include/linux/vringh.h:104: warning: Function parameter or member 'i' not described in 'vringh_kiov'
include/linux/vringh.h:104: warning: Function parameter or member 'used' not described in 'vringh_kiov'
include/linux/vringh.h:104: warning: Function parameter or member 'max_num' not described in 'vringh_kiov'

Signed-off-by: Simon Horman <horms@kernel.org>
Message-Id: <20230331-vhost-fixes-v1-2-1f046e735b9e@kernel.org>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>

authored by

Simon Horman and committed by
Michael S. Tsirkin
b2ffaa67 9be5d2d4

+15 -2
+15 -2
include/linux/vringh.h
··· 57 57 void (*notify)(struct vringh *); 58 58 }; 59 59 60 + struct virtio_device; 61 + typedef void vrh_callback_t(struct virtio_device *, struct vringh *); 62 + 60 63 /** 61 64 * struct vringh_config_ops - ops for creating a host vring from a virtio driver 62 65 * @find_vrhs: find the host vrings and instantiate them ··· 71 68 * Returns 0 on success or error status 72 69 * @del_vrhs: free the host vrings found by find_vrhs(). 73 70 */ 74 - struct virtio_device; 75 - typedef void vrh_callback_t(struct virtio_device *, struct vringh *); 76 71 struct vringh_config_ops { 77 72 int (*find_vrhs)(struct virtio_device *vdev, unsigned nhvrs, 78 73 struct vringh *vrhs[], vrh_callback_t *callbacks[]); ··· 85 84 86 85 /** 87 86 * struct vringh_iov - iovec mangler. 87 + * @iov: array of iovecs to operate on 88 + * @consumed: number of bytes consumed within iov[i] 89 + * @i: index of current iovec 90 + * @used: number of iovecs present in @iov 91 + * @max_num: maximum number of iovecs. 92 + * corresponds to allocated memory of @iov 88 93 * 89 94 * Mangles iovec in place, and restores it. 90 95 * Remaining data is iov + i, of used - i elements. ··· 103 96 104 97 /** 105 98 * struct vringh_kiov - kvec mangler. 99 + * @iov: array of iovecs to operate on 100 + * @consumed: number of bytes consumed within iov[i] 101 + * @i: index of current iovec 102 + * @used: number of iovecs present in @iov 103 + * @max_num: maximum number of iovecs. 104 + * corresponds to allocated memory of @iov 106 105 * 107 106 * Mangles kvec in place, and restores it. 108 107 * Remaining data is iov + i, of used - i elements.