On 10/16/26 10:41, [email protected] wrote:
Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
to consider:
- [Low] dma-buf: incorrect return value documentation in dma_buf_io_init_map()
kerneldoc
--
commit b6debb4c02ab1cee94fc3f78293f8425b78664d4
Author: Pavel Begunkov <[email protected]>
dma-buf-io: document dma_buf_io_init_map
This commit adds kerneldoc documentation for the dma_buf_io_init_map()
function.
diff --git a/drivers/dma-buf/dma-buf-io.c b/drivers/dma-buf/dma-buf-io.c
index e432194a5dfc0..f724936e223b1 100644
--- a/drivers/dma-buf/dma-buf-io.c
+++ b/drivers/dma-buf/dma-buf-io.c
@@ -43,6 +43,18 @@ static void dma_buf_io_kill_map(struct dma_buf_io_ctx *ctx)
dma_buf_io_map_release(map);
}
+/**
+ * dma_buf_io_init_map - Initialise the map.
+ * @ctx: [in] dma-buf I/O context the map is created for
+ * @map: [in] dma-buf I/O map
+ * @sgt: [in] the backing scatter-gather table
+ *
+ * Importer's helper that initialises @map for the provided I/O context
+ * and scatter-gather table. The importer should call it once for each map
+ * on creation.
+ *
+ * Returns a map on success, or a negative errno code otherwise.
[Severity: Low]
This isn't a bug, but the kerneldoc states this function returns a map,
while the actual implementation returns an int (0 on success) and modifies
the map argument in place.
Slipped through indeed.
Could this be updated to accurately reflect the return value and use the
standard "Return:" tag format expected by automated kerneldoc tools?
+ */
int dma_buf_io_init_map(struct dma_buf_io_ctx *ctx, struct dma_buf_io_map
*map,
struct sg_table *sgt)
{
--
Pavel Begunkov