Skip to contentSkip to conversation

virtio: fix kernel-doc warnings for virtio_device

PATCH In review Kenner de Azevedo dos Santos Miranda 2 participants 3 messages Mar 12 – Apr 26 virtio core

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio: fix kernel-doc warnings for virtio_device

The following warnings were reported when running 'make htmldocs':

  WARNING: ./include/linux/virtio.h:188 struct member 'map'
  not described in 'virtio_device'

  WARNING: ./include/linux/virtio.h:188 struct member
  'VIRTIO_DECLARE_FEATURES(features' not described in
  'virtio_device'

  WARNING: ./include/linux/virtio.h:188 struct member 'vmap'
  not described in 'virtio_device'

Document the map and vmap fields in struct virtio_device.

Also avoid kernel-doc confusion caused by the VIRTIO_DECLARE_FEATURES() macro by documenting the logical @features field.

After these changes, running 'make htmldocs' no longer reports warnings for map, vmap, or VIRTIO_DECLARE_FEATURES().

---
 include/linux/virtio.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/linux/virtio.h +4 -1
index 3bbc4cb6a672..074d36453177 100644
@@ -157,11 +157,13 @@ struct virtio_admin_cmd {
  * @id: the device type identification (used to match it with a driver).
  * @config: the configuration ops for this device.
  * @vringh_config: configuration ops for host vrings.
+ * @map: virtio specific mapping operations used by the device or transport.
  * @vqs: the list of virtqueues for this device.
  * @features: the 64 lower features supported by both driver and device.
  * @features_array: the full features space supported by both driver and
- *		    device.
+ *                device.
  * @priv: private pointer for the driver's use.
+ * @vmap: mapping token passed to virtio mapping helpers and transport ops.
  * @debugfs_dir: debugfs directory entry.
  * @debugfs_filter_features: features to be filtered set by debugfs.
  */
@@ -179,6 +181,7 @@ struct virtio_device {
 	const struct vringh_config_ops *vringh_config;
 	const struct virtio_map_ops *map;
 	struct list_head vqs;
+       /* See @features */
 	VIRTIO_DECLARE_FEATURES(features);
 	void *priv;
 	union virtio_map vmap;
Signature · 1 line
2.43.0
#1 lore raw
Quoted 14 lines · Kenner de Azevedo dos Santos Miranda

The following warnings were reported when running 'make htmldocs':

  WARNING: ./include/linux/virtio.h:188 struct member 'map'
  not described in 'virtio_device'

  WARNING: ./include/linux/virtio.h:188 struct member
  'VIRTIO_DECLARE_FEATURES(features' not described in
  'virtio_device'

  WARNING: ./include/linux/virtio.h:188 struct member 'vmap'
  not described in 'virtio_device'

Document the map and vmap fields in struct virtio_device.

Quoted 7 lines

Also avoid kernel-doc confusion caused by the VIRTIO_DECLARE_FEATURES() macro by documenting the logical @features field.

After these changes, running 'make htmldocs' no longer reports warnings for map, vmap, or VIRTIO_DECLARE_FEATURES().

I will queue this. Thanks!

Quoted 33 lines
---
 include/linux/virtio.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/linux/virtio.h +4 -1
index 3bbc4cb6a672..074d36453177 100644
@@ -157,11 +157,13 @@ struct virtio_admin_cmd {
  * @id: the device type identification (used to match it with a driver).
  * @config: the configuration ops for this device.
  * @vringh_config: configuration ops for host vrings.
+ * @map: virtio specific mapping operations used by the device or transport.
  * @vqs: the list of virtqueues for this device.
  * @features: the 64 lower features supported by both driver and device.
  * @features_array: the full features space supported by both driver and
- *		    device.
+ *                device.
  * @priv: private pointer for the driver's use.
+ * @vmap: mapping token passed to virtio mapping helpers and transport ops.
  * @debugfs_dir: debugfs directory entry.
  * @debugfs_filter_features: features to be filtered set by debugfs.
  */
@@ -179,6 +181,7 @@ struct virtio_device {
 	const struct vringh_config_ops *vringh_config;
 	const struct virtio_map_ops *map;
 	struct list_head vqs;
+       /* See @features */
 	VIRTIO_DECLARE_FEATURES(features);
 	void *priv;
 	union virtio_map vmap;
Signature · 1 line
2.43.0
#2 lore raw

Hi team, good evening.

Is there any update regarding this patch?

Thank you very much.

Quoted 61 lines · Michael S. Tsirkin
Quoted 14 lines · Kenner de Azevedo dos Santos Miranda

The following warnings were reported when running 'make htmldocs':

  WARNING: ./include/linux/virtio.h:188 struct member 'map'
  not described in 'virtio_device'

  WARNING: ./include/linux/virtio.h:188 struct member
  'VIRTIO_DECLARE_FEATURES(features' not described in
  'virtio_device'

  WARNING: ./include/linux/virtio.h:188 struct member 'vmap'
  not described in 'virtio_device'

Document the map and vmap fields in struct virtio_device.

Quoted 7 lines

Also avoid kernel-doc confusion caused by the VIRTIO_DECLARE_FEATURES() macro by documenting the logical @features field.

After these changes, running 'make htmldocs' no longer reports warnings for map, vmap, or VIRTIO_DECLARE_FEATURES().

I will queue this. Thanks!

Quoted 33 lines
---
 include/linux/virtio.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
include/linux/virtio.h +4 -2
index 3bbc4cb6a672..074d36453177 100644
@@ -157,11 +157,13 @@ struct virtio_admin_cmd {
  * @id: the device type identification (used to match it with a driver).
  * @config: the configuration ops for this device.
  * @vringh_config: configuration ops for host vrings.
+ * @map: virtio specific mapping operations used by the device or transport.
  * @vqs: the list of virtqueues for this device.
  * @features: the 64 lower features supported by both driver and device.
  * @features_array: the full features space supported by both driver and
- *               device.
+ *                device.
  * @priv: private pointer for the driver's use.
+ * @vmap: mapping token passed to virtio mapping helpers and transport ops.
  * @debugfs_dir: debugfs directory entry.
  * @debugfs_filter_features: features to be filtered set by debugfs.
  */
@@ -179,6 +181,7 @@ struct virtio_device {
      const struct vringh_config_ops *vringh_config;
      const struct virtio_map_ops *map;
      struct list_head vqs;
+       /* See @features */
      VIRTIO_DECLARE_FEATURES(features);
      void *priv;
      union virtio_map vmap;
--

2.43.0