[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250624133923.1140421-5-ptesarik@suse.com>
Date: Tue, 24 Jun 2025 15:39:19 +0200
From: Petr Tesarik <ptesarik@...e.com>
To: Jonathan Corbet <corbet@....net>,
Morton <akpm@...ux-foundation.org>
Cc: Marek Szyprowski <m.szyprowski@...sung.com>,
Leon Romanovsky <leon@...nel.org>,
Keith Busch <kbusch@...nel.org>,
Caleb Sander Mateos <csander@...estorage.com>,
Sagi Grimberg <sagi@...mberg.me>,
Jens Axboe <axboe@...nel.dk>,
John Garry <john.g.garry@...cle.com>,
linux-doc@...r.kernel.org (open list:DOCUMENTATION),
linux-kernel@...r.kernel.org (open list),
linux-mm@...ck.org (open list:MEMORY MANAGEMENT),
Petr Tesarik <ptesarik@...e.com>
Subject: [PATCH 4/8] docs: dma-api: add a kernel-doc comment for dma_pool_zalloc()
Document the dma_pool_zalloc() wrapper.
Signed-off-by: Petr Tesarik <ptesarik@...e.com>
---
Documentation/core-api/mm-api.rst | 2 ++
include/linux/dmapool.h | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/Documentation/core-api/mm-api.rst b/Documentation/core-api/mm-api.rst
index af8151db88b2..a61766328ac0 100644
--- a/Documentation/core-api/mm-api.rst
+++ b/Documentation/core-api/mm-api.rst
@@ -97,6 +97,8 @@ DMA pools
.. kernel-doc:: mm/dmapool.c
:export:
+.. kernel-doc:: include/linux/dmapool.h
+
More Memory Management Functions
================================
diff --git a/include/linux/dmapool.h b/include/linux/dmapool.h
index 06c4de602b2f..c0c7717d3ae7 100644
--- a/include/linux/dmapool.h
+++ b/include/linux/dmapool.h
@@ -60,6 +60,14 @@ static inline struct dma_pool *dma_pool_create(const char *name,
NUMA_NO_NODE);
}
+/**
+ * dma_pool_zalloc - Get a zero-initialized block of DMA coherent memory.
+ * @pool: dma pool that will produce the block
+ * @mem_flags: GFP_* bitmask
+ * @handle: pointer to dma address of block
+ *
+ * Same as @dma_pool_alloc, but the returned memory is zeroed.
+ */
static inline void *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags,
dma_addr_t *handle)
{
--
2.49.0
Powered by blists - more mailing lists