* [PATCH 1/8] virtio: fix typo in virtio_device_ready() comment
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 2/8] virtio: fix whitespace in virtio_config_ops Michael S. Tsirkin
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, virtualization
"coherenct" -> "coherent"
Fixes: 8b4ec69d7e09 ("virtio: harden vring IRQ")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 16001e9f9b39..1ea5baa62141 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -362,7 +362,7 @@ void virtio_device_ready(struct virtio_device *dev)
* specific set_status() method.
*
* A well behaved device will only notify a virtqueue after
- * DRIVER_OK, this means the device should "see" the coherenct
+ * DRIVER_OK, this means the device should "see" the coherent
* memory write that set vq->broken as false which is done by
* the driver when it sees DRIVER_OK, then the following
* driver's vring_interrupt() will see vq->broken as false so
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 2/8] virtio: fix whitespace in virtio_config_ops
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 1/8] virtio: fix typo in virtio_device_ready() comment Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 3/8] virtio: fix grammar in virtio_queue_info docs Michael S. Tsirkin
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, Bagas Sanjaya, Ricardo Cañuelo,
Cornelia Huck, virtualization
The finalize_features documentation uses a tab between words.
Use space instead.
Fixes: d16c0cd27331 ("docs: driver-api: virtio: virtio on Linux")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 1ea5baa62141..dbc7eff1f101 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -86,7 +86,7 @@ struct virtqueue_info {
* vdev: the virtio_device
* This sends the driver feature bits to the device: it can change
* the dev->feature bits if it wants.
- * Note that despite the name this can be called any number of
+ * Note that despite the name this can be called any number of
* times.
* Returns 0 on success or error status
* @bus_name: return the bus name associated with the device (optional)
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 3/8] virtio: fix grammar in virtio_queue_info docs
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 1/8] virtio: fix typo in virtio_device_ready() comment Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 2/8] virtio: fix whitespace in virtio_config_ops Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 4/8] virtio: fix grammar in virtio_map_ops docs Michael S. Tsirkin
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, Jiri Pirko, virtualization
Fix grammar in the description of @ctx
Fixes: c502eb85c34e ("virtio: introduce virtio_queue_info struct and find_vqs_info() config op")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index dbc7eff1f101..78cf4119f567 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -24,7 +24,7 @@ typedef void vq_callback_t(struct virtqueue *);
* a virtqueue unused by the driver.
* @callback: A callback to invoke on a used buffer notification.
* NULL for a virtqueue that does not need a callback.
- * @ctx: A flag to indicate to maintain an extra context per virtqueue.
+ * @ctx: whether to maintain an extra context per virtqueue.
*/
struct virtqueue_info {
const char *name;
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 4/8] virtio: fix grammar in virtio_map_ops docs
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
` (2 preceding siblings ...)
2025-11-13 9:34 ` [PATCH 3/8] virtio: fix grammar in virtio_queue_info docs Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 5/8] virtio: standardize Returns documentation style Michael S. Tsirkin
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, virtualization
Fix grammar issues in the virtio_map_ops docs:
- missing article before "transport"
- "implements" -> "implement" to match subject
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 78cf4119f567..6660132258d4 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -141,8 +141,8 @@ struct virtio_config_ops {
/**
* struct virtio_map_ops - operations for mapping buffer for a virtio device
- * Note: For transport that has its own mapping logic it must
- * implements all of the operations
+ * Note: For a transport that has its own mapping logic it must
+ * implement all of the operations
* @map_page: map a buffer to the device
* map: metadata for performing mapping
* page: the page that will be mapped by the device
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 5/8] virtio: standardize Returns documentation style
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
` (3 preceding siblings ...)
2025-11-13 9:34 ` [PATCH 4/8] virtio: fix grammar in virtio_map_ops docs Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 6/8] virtio: fix virtqueue_set_affinity() docs Michael S. Tsirkin
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, virtualization
Remove colons after "Returns" in virtio_map_ops function
documentation - both to avoid triggering an htmldoc warning
and for consistency with virtio_config_ops.
This affects map_page, alloc, need_sync, and max_mapping_size.
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 6660132258d4..e231147ff92d 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -150,7 +150,7 @@ struct virtio_config_ops {
* size: the buffer size
* dir: mapping direction
* attrs: mapping attributes
- * Returns: the mapped address
+ * Returns the mapped address
* @unmap_page: unmap a buffer from the device
* map: device specific mapping map
* map_handle: the mapped address
@@ -172,7 +172,7 @@ struct virtio_config_ops {
* size: the size of the buffer
* map_handle: the mapping address to sync
* gfp: allocation flag (GFP_XXX)
- * Returns: virtual address of the allocated buffer
+ * Returns virtual address of the allocated buffer
* @free: free a coherent buffer mapping
* map: metadata for performing mapping
* size: the size of the buffer
@@ -182,13 +182,13 @@ struct virtio_config_ops {
* @need_sync: if the buffer needs synchronization
* map: metadata for performing mapping
* map_handle: the mapped address
- * Returns: whether the buffer needs synchronization
+ * Returns whether the buffer needs synchronization
* @mapping_error: if the mapping address is error
* map: metadata for performing mapping
* map_handle: the mapped address
* @max_mapping_size: get the maximum buffer size that can be mapped
* map: metadata for performing mapping
- * Returns: the maximum buffer size that can be mapped
+ * Returns the maximum buffer size that can be mapped
*/
struct virtio_map_ops {
dma_addr_t (*map_page)(union virtio_map map, struct page *page,
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 6/8] virtio: fix virtqueue_set_affinity() docs
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
` (4 preceding siblings ...)
2025-11-13 9:34 ` [PATCH 5/8] virtio: standardize Returns documentation style Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 7/8] virtio_ring: fix htmldoc warnings Michael S. Tsirkin
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, Paolo Bonzini, Rusty Russell, virtualization
Rewrite the comment for better grammar and clarity.
Fixes: 75a0a52be3c2 ("virtio: introduce an API to set affinity for a virtqueue")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index e231147ff92d..1a019a1f168d 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -384,7 +384,7 @@ const char *virtio_bus_name(struct virtio_device *vdev)
* @vq: the virtqueue
* @cpu_mask: the cpu mask
*
- * Pay attention the function are best-effort: the affinity hint may not be set
+ * Note that this function is best-effort: the affinity hint may not be set
* due to config support, irq type and sharing.
*
*/
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 7/8] virtio_ring: fix htmldoc warnings
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
` (5 preceding siblings ...)
2025-11-13 9:34 ` [PATCH 6/8] virtio: fix virtqueue_set_affinity() docs Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-13 9:34 ` [PATCH 8/8] virtio: fix map ops comment Michael S. Tsirkin
2025-11-14 0:59 ` [PATCH 0/8] virtio htmldoc comment fixes Jason Wang
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, virtualization
We get:
drivers/virtio/virtio_ring.c:3174 - Missing parameter description for vaddr in virtqueue_map_free_coherent()
drivers/virtio/virtio_ring.c:3308 - Documentation mismatch: expecting prototype for virtqueue_mapping_error() but the actual
Fix these.
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
drivers/virtio/virtio_ring.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c
index 7b6205253b46..1b32aa38d26e 100644
--- a/drivers/virtio/virtio_ring.c
+++ b/drivers/virtio/virtio_ring.c
@@ -3166,6 +3166,7 @@ EXPORT_SYMBOL_GPL(virtqueue_map_alloc_coherent);
* @vdev: the virtio device we are talking to
* @map: metadata for performing mapping
* @size: the size of the buffer
+ * @vaddr: virtual address of the buffer
* @map_handle: the mapped address that needs to be freed
*
*/
@@ -3299,7 +3300,7 @@ void virtqueue_unmap_single_attrs(const struct virtqueue *_vq,
EXPORT_SYMBOL_GPL(virtqueue_unmap_single_attrs);
/**
- * virtqueue_mapping_error - check dma address
+ * virtqueue_map_mapping_error - check dma address
* @_vq: the struct virtqueue we're talking about.
* @addr: DMA address
*
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* [PATCH 8/8] virtio: fix map ops comment
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
` (6 preceding siblings ...)
2025-11-13 9:34 ` [PATCH 7/8] virtio_ring: fix htmldoc warnings Michael S. Tsirkin
@ 2025-11-13 9:34 ` Michael S. Tsirkin
2025-11-14 0:59 ` [PATCH 0/8] virtio htmldoc comment fixes Jason Wang
8 siblings, 0 replies; 10+ messages in thread
From: Michael S. Tsirkin @ 2025-11-13 9:34 UTC (permalink / raw)
To: linux-kernel, Jonathan Corbet
Cc: Stephen Rothwell, Mauro Carvalho Chehab, Jason Wang, Xuan Zhuo,
Eugenio Pérez, virtualization
@free will free the map handle not sync it. Fix the doc to match.
Fixes: bee8c7c24b73 ("virtio: introduce map ops in virtio core")
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
include/linux/virtio_config.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 1a019a1f168d..a1af2676bbe6 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -177,7 +177,7 @@ struct virtio_config_ops {
* map: metadata for performing mapping
* size: the size of the buffer
* vaddr: virtual address of the buffer
- * map_handle: the mapping address to sync
+ * map_handle: the mapping address that needs to be freed
* attrs: unmapping attributes
* @need_sync: if the buffer needs synchronization
* map: metadata for performing mapping
--
MST
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 0/8] virtio htmldoc comment fixes
2025-11-13 9:34 [PATCH 0/8] virtio htmldoc comment fixes Michael S. Tsirkin
` (7 preceding siblings ...)
2025-11-13 9:34 ` [PATCH 8/8] virtio: fix map ops comment Michael S. Tsirkin
@ 2025-11-14 0:59 ` Jason Wang
8 siblings, 0 replies; 10+ messages in thread
From: Jason Wang @ 2025-11-14 0:59 UTC (permalink / raw)
To: Michael S. Tsirkin
Cc: linux-kernel, Jonathan Corbet, Stephen Rothwell,
Mauro Carvalho Chehab
On Thu, Nov 13, 2025 at 5:34 PM Michael S. Tsirkin <mst@redhat.com> wrote:
>
> This fixes warnings reported by htmldoc as well
> as a couple of others I found while reading the code.
>
> Jason, I found a bunch more issues with the map ops patches, like weird
Thanks.
>
> /*
> * XXX
> *
> */
>
> multiline comments, weirdly formatted return, inconsistent use of
> "the" for some parameters but not others.
>
> Pls take a look and address.
Acked-by: Jason Wang <jasowang@redhat.com>
>
> Michael S. Tsirkin (8):
> virtio: fix typo in virtio_device_ready() comment
> virtio: fix whitespace in virtio_config_ops
> virtio: fix grammar in virtio_queue_info docs
> virtio: fix grammar in virtio_map_ops docs
> virtio: standardize Returns documentation style
> virtio: fix virtqueue_set_affinity() docs
> virtio_ring: fix htmldoc warnings
> virtio: fix map ops comment
>
> drivers/virtio/virtio_ring.c | 3 ++-
> include/linux/virtio_config.h | 22 +++++++++++-----------
> 2 files changed, 13 insertions(+), 12 deletions(-)
>
> --
> MST
>
^ permalink raw reply [flat|nested] 10+ messages in thread