From aeef964d73dbfd7f477182bac934cdb4087d1724 Mon Sep 17 00:00:00 2001 From: Pavel Begunkov Date: Fri, 16 Oct 2026 10:58:31 +0100 Subject: [PATCH] dma-buf-io: document dma_buf_io_init_map Add a kerneldoc for dma_buf_io_init_map(). Signed-off-by: Pavel Begunkov Link: https://patch.msgid.link/a9fdfbe6e447ac583f4d3a3f981b203141a624c4.1792144609.git.asml.silence@gmail.com Signed-off-by: Jens Axboe --- drivers/dma-buf/dma-buf-io.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/dma-buf/dma-buf-io.c b/drivers/dma-buf/dma-buf-io.c index e432194a5dfc..8440151de860 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. + * + * Return: 0 on success, or a negative errno code otherwise. + */ int dma_buf_io_init_map(struct dma_buf_io_ctx *ctx, struct dma_buf_io_map *map, struct sg_table *sgt) {