* [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c
@ 2025-07-17 2:41 jiang.peng9
2025-07-17 6:04 ` Michael S. Tsirkin
0 siblings, 1 reply; 5+ messages in thread
From: jiang.peng9 @ 2025-07-17 2:41 UTC (permalink / raw)
To: mst
Cc: jasowang, xuanzhuo, eperezma, sumit.semwal, christian.koenig,
virtualization, linux-kernel, linux-media, dri-devel, xu.xin16,
yang.yang29
From: Peng Jiang <jiang.peng9@zte.com.cn>
Fix kernel-doc descriptions in virtio_dma_buf.c to fix W=1 warnings:
drivers/virtio/virtio_dma_buf.c:41 function parameter 'dma_buf' not described in 'virtio_dma_buf_attach'
drivers/virtio/virtio_dma_buf.c:41 function parameter 'attach' not described in 'virtio_dma_buf_attach'
Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
---
drivers/virtio/virtio_dma_buf.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/virtio/virtio_dma_buf.c b/drivers/virtio/virtio_dma_buf.c
index 3fe1d03b0645..986cc73c503f 100644
--- a/drivers/virtio/virtio_dma_buf.c
+++ b/drivers/virtio/virtio_dma_buf.c
@@ -16,6 +16,8 @@
* This wraps dma_buf_export() to allow virtio drivers to create a dma-buf
* for an virtio exported object that can be queried by other virtio drivers
* for the object's UUID.
+ *
+ * Returns: dma-buf pointer on success, ERR_PTR on failure.
*/
struct dma_buf *virtio_dma_buf_export
(const struct dma_buf_export_info *exp_info)
@@ -36,6 +38,14 @@ EXPORT_SYMBOL(virtio_dma_buf_export);
/**
* virtio_dma_buf_attach - mandatory attach callback for virtio dma-bufs
+ * @dma_buf: DMA buffer being attached to a device
+ * @attach: Attachment metadata for the device-dma_buf association
+ *
+ * Allows virtio devices to perform device-specific setup when a DMA buffer
+ * is attached to a device. This is part of the DMA-BUF sharing mechanism
+ * that enables virtio devices to interoperate with other subsystems.
+ *
+ * Returns: 0 on success, negative on failure.
*/
int virtio_dma_buf_attach(struct dma_buf *dma_buf,
struct dma_buf_attachment *attach)
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c
2025-07-17 2:41 [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c jiang.peng9
@ 2025-07-17 6:04 ` Michael S. Tsirkin
2025-07-17 8:07 ` jiang.peng9
0 siblings, 1 reply; 5+ messages in thread
From: Michael S. Tsirkin @ 2025-07-17 6:04 UTC (permalink / raw)
To: jiang.peng9
Cc: jasowang, xuanzhuo, eperezma, sumit.semwal, christian.koenig,
virtualization, linux-kernel, linux-media, dri-devel, xu.xin16,
yang.yang29
On Thu, Jul 17, 2025 at 10:41:59AM +0800, jiang.peng9@zte.com.cn wrote:
> From: Peng Jiang <jiang.peng9@zte.com.cn>
>
> Fix kernel-doc descriptions in virtio_dma_buf.c to fix W=1 warnings:
>
> drivers/virtio/virtio_dma_buf.c:41 function parameter 'dma_buf' not described in 'virtio_dma_buf_attach'
> drivers/virtio/virtio_dma_buf.c:41 function parameter 'attach' not described in 'virtio_dma_buf_attach'
>
> Signed-off-by: Peng Jiang <jiang.peng9@zte.com.cn>
> ---
> drivers/virtio/virtio_dma_buf.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/drivers/virtio/virtio_dma_buf.c b/drivers/virtio/virtio_dma_buf.c
> index 3fe1d03b0645..986cc73c503f 100644
> --- a/drivers/virtio/virtio_dma_buf.c
> +++ b/drivers/virtio/virtio_dma_buf.c
> @@ -16,6 +16,8 @@
> * This wraps dma_buf_export() to allow virtio drivers to create a dma-buf
> * for an virtio exported object that can be queried by other virtio drivers
> * for the object's UUID.
> + *
> + * Returns: dma-buf pointer on success, ERR_PTR on failure.
Most people write "dmabuf".
> */
> struct dma_buf *virtio_dma_buf_export
> (const struct dma_buf_export_info *exp_info)
> @@ -36,6 +38,14 @@ EXPORT_SYMBOL(virtio_dma_buf_export);
>
> /**
> * virtio_dma_buf_attach - mandatory attach callback for virtio dma-bufs
> + * @dma_buf: DMA buffer being attached to a device
And here it's different for some reason.
> + * @attach: Attachment metadata for the device-dma_buf association
and here in a third form.
> + *
> + * Allows virtio devices to perform device-specific setup when a DMA buffer
> + * is attached to a device. This is part of the DMA-BUF sharing mechanism
> + * that enables virtio devices to interoperate with other subsystems.
I'm sorry this is just empty of content.
I can not shake the feeling this is AI written.
If we wanted AI to document all APIs in this way, I'd just script it.
> + *
> + * Returns: 0 on success, negative on failure.
This one is ok.
> */
> int virtio_dma_buf_attach(struct dma_buf *dma_buf,
> struct dma_buf_attachment *attach)
> --
> 2.25.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c
2025-07-17 6:04 ` Michael S. Tsirkin
@ 2025-07-17 8:07 ` jiang.peng9
2025-07-22 7:56 ` WangYuli
0 siblings, 1 reply; 5+ messages in thread
From: jiang.peng9 @ 2025-07-17 8:07 UTC (permalink / raw)
To: mst
Cc: jasowang, xuanzhuo, eperezma, sumit.semwal, christian.koenig,
virtualization, linux-kernel, linux-media, dri-devel, xu.xin16,
yang.yang29
> > diff --git a/drivers/virtio/virtio_dma_buf.c b/drivers/virtio/virtio_dma_buf.c
> > index 3fe1d03b0645..986cc73c503f 100644
> > --- a/drivers/virtio/virtio_dma_buf.c
> > +++ b/drivers/virtio/virtio_dma_buf.c
> > @@ -16,6 +16,8 @@
> > * This wraps dma_buf_export() to allow virtio drivers to create a dma-buf
> > * for an virtio exported object that can be queried by other virtio drivers
> > * for the object's UUID.
> > + *
> > + * Returns: dma-buf pointer on success, ERR_PTR on failure.
>
> Most people write "dmabuf".
Thanks for pointing this out. In virtio_dma_buf.c specifically, "dma-buf" appears more frequently throughout the file.
For consistency within this file, I'll keep using "dma-buf" in these docs.
> > */
> > struct dma_buf *virtio_dma_buf_export
> > (const struct dma_buf_export_info *exp_info)
> > @@ -36,6 +38,14 @@ EXPORT_SYMBOL(virtio_dma_buf_export);
> >
> > /**
> > * virtio_dma_buf_attach - mandatory attach callback for virtio dma-bufs
> > + * @dma_buf: DMA buffer being attached to a device
>
> And here it's different for some reason.
>
> > + * @attach: Attachment metadata for the device-dma_buf association
>
> and here in a third form.
Thanks for catching the inconsistency. Here are the standardized parameter descriptions:
@dma_buf: dma-buf being attached to a device
@attach: Attachment metadata for the dma-buf association
> > + *
> > + * Allows virtio devices to perform device-specific setup when a DMA buffer
> > + * is attached to a device. This is part of the DMA-BUF sharing mechanism
> > + * that enables virtio devices to interoperate with other subsystems.
>
> I'm sorry this is just empty of content.
> I can not shake the feeling this is AI written.
> If we wanted AI to document all APIs in this way, I'd just script it.
I‘ll remove the generic description.
Best regards,
Peng Jiang
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Re: [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c
2025-07-17 8:07 ` jiang.peng9
@ 2025-07-22 7:56 ` WangYuli
2025-07-22 8:25 ` jiang.peng9
0 siblings, 1 reply; 5+ messages in thread
From: WangYuli @ 2025-07-22 7:56 UTC (permalink / raw)
To: jiang.peng9
Cc: christian.koenig, dri-devel, eperezma, jasowang, linux-kernel,
linux-media, mst, sumit.semwal, virtualization, xu.xin16,
xuanzhuo, yang.yang29
Hi Peng Jiang,
Please feel free to add "Reviewed-by: WangYuli <wangyuli@uniontech.com>"
to your patch v4. [1]
[1]. https://lore.kernel.org/all/20250716094357-mutt-send-email-mst@kernel.org/
Thanks,
--
WangYuli
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c
2025-07-22 7:56 ` WangYuli
@ 2025-07-22 8:25 ` jiang.peng9
0 siblings, 0 replies; 5+ messages in thread
From: jiang.peng9 @ 2025-07-22 8:25 UTC (permalink / raw)
To: wangyuli
Cc: christian.koenig, dri-devel, eperezma, jasowang, linux-kernel,
linux-media, mst, sumit.semwal, virtualization, xu.xin16,
xuanzhuo, yang.yang29
Hi Yuli,
Thank you for notifying me about this. Please proceed with your patch directly - I have no concerns.
Best regards,
Peng Jiang
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-07-22 8:25 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 2:41 [PATCH v3] virtio: Update kerneldoc in drivers/virtio/virtio_dma_buf.c jiang.peng9
2025-07-17 6:04 ` Michael S. Tsirkin
2025-07-17 8:07 ` jiang.peng9
2025-07-22 7:56 ` WangYuli
2025-07-22 8:25 ` jiang.peng9
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).