dma-buf: fix stale return value documentation for dma_buf_set_name()
Subsystems (2)
PATCH 1/1 dma-buf: fix stale return value documentation for dma_buf_set_name()
The kernel-doc for dma_buf_set_name() documents an -EBUSY return for the case where the dma-buf is already attached to devices. The function has no such path: it returns 0 on success, or the error from strndup_user().
kernel-doc does not validate prose, so scripts/kernel-doc does not report this.
--- drivers/dma-buf/dma-buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma-buf/dma-buf.c +2 -2
@@ -413,8 +413,8 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll)* @buf: [in] A piece of userspace memory that contains the name of * the dma-buf. * -* Returns 0 on success. If the dma-buf buffer is already attached to -* devices, return -EBUSY. +* Returns 0 on success, or a negative error code from strndup_user() if the +* name cannot be copied in. * */ static long dma_buf_set_name (struct dma_buf *dmabuf,const char __user *buf)
Signature · 1 line
2.43.0
PATCH v2 1/1 dma-buf: fix stale return value documentation for dma_buf_set_name()
Commit e73c317efbf9 ("dma-buf: remove restriction of IOCTL:DMA_BUF_SET_NAME") removed the dma_resv_lock() and the check on dmabuf->attachments that returned -EBUSY. It updated the description above the function accordingly, but left the return value description untouched.
dma_buf_set_name() now returns 0 on success, or the error from strndup_user(); there is no -EBUSY path left. Update the description to match the code.
kernel-doc does not validate prose, so scripts/kernel-doc does not report this.
---
v2: Add a Fixes: tag identifying the commit that left the return value
description stale. No change to the diff.
drivers/dma-buf/dma-buf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma-buf/dma-buf.c +2 -2
@@ -413,8 +413,8 @@ static __poll_t dma_buf_poll(struct file *file, poll_table *poll)* @buf: [in] A piece of userspace memory that contains the name of * the dma-buf. * -* Returns 0 on success. If the dma-buf buffer is already attached to -* devices, return -EBUSY. +* Returns 0 on success, or a negative error code from strndup_user() if the +* name cannot be copied in. * */ static long dma_buf_set_name (struct dma_buf *dmabuf,const char __user *buf)
Signature · 1 line
2.43.0