From: <jiang.peng9@zte.com.cn>
To: <jasowang@redhat.com>, <xuanzhuo@linux.alibaba.com>
Cc: <mst@redhat.com>, <eperezma@redhat.com>,
<sumit.semwal@linaro.org>, <christian.koenig@amd.com>,
<virtualization@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
<linux-media@vger.kernel.org>, <dri-devel@lists.freedesktop.org>,
<linaro-mm-sig@lists.linaro.org>, <xu.xin16@zte.com.cn>,
<yang.yang29@zte.com.cn>
Subject: [PATCH] virtio: Add missing kerneldoc for virtio_dma_buf_attach
Date: Fri, 4 Jul 2025 15:20:47 +0800 (CST) [thread overview]
Message-ID: <20250704152047205U11FdEih1MxrmcmAz0Xpp@zte.com.cn> (raw)
From: Peng Jiang <jiang.peng9@zte.com.cn>
Add kerneldoc for 'virtio_dma_buf_attach' function 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 | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/virtio/virtio_dma_buf.c b/drivers/virtio/virtio_dma_buf.c
index 3fe1d03b0645..18d261ba5197 100644
--- a/drivers/virtio/virtio_dma_buf.c
+++ b/drivers/virtio/virtio_dma_buf.c
@@ -35,7 +35,16 @@ struct dma_buf *virtio_dma_buf_export
EXPORT_SYMBOL(virtio_dma_buf_export);
/**
- * virtio_dma_buf_attach - mandatory attach callback for virtio dma-bufs
+ * virtio_dma_buf_attach - Mandatory attach callback for virtio dma-bufs
+ * @dma_buf: Pointer to the shared dma-buf structure
+ * @attach: Pointer to the newly created attachment metadata
+ *
+ * Description: Implements the standard dma-buf attach operation for virtio devices.
+ * Retrieves virtio-specific operations through container_of macro,
+ * then invokes device-specific attach callback if present.
+ * This enables virtio devices to participate in dma-buf sharing.
+ *
+ * Return: 0 on success, error code on failure
*/
int virtio_dma_buf_attach(struct dma_buf *dma_buf,
struct dma_buf_attachment *attach)
--
2.25.1
next reply other threads:[~2025-07-04 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-04 7:20 jiang.peng9 [this message]
2025-07-04 15:19 ` Krzysztof Kozlowski
2025-07-05 2:14 ` jiang.peng9
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250704152047205U11FdEih1MxrmcmAz0Xpp@zte.com.cn \
--to=jiang.peng9@zte.com.cn \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=eperezma@redhat.com \
--cc=jasowang@redhat.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mst@redhat.com \
--cc=sumit.semwal@linaro.org \
--cc=virtualization@lists.linux.dev \
--cc=xu.xin16@zte.com.cn \
--cc=xuanzhuo@linux.alibaba.com \
--cc=yang.yang29@zte.com.cn \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®