]> www.infradead.org Git - users/willy/linux.git/commitdiff
docs: dma-api: add a kernel-doc comment for dma_pool_zalloc()
authorPetr Tesarik <ptesarik@suse.com>
Fri, 27 Jun 2025 10:10:11 +0000 (12:10 +0200)
committerJonathan Corbet <corbet@lwn.net>
Tue, 1 Jul 2025 19:55:37 +0000 (13:55 -0600)
Document the dma_pool_zalloc() wrapper.

Signed-off-by: Petr Tesarik <ptesarik@suse.com>
Reviewed-by: Randy Dunlap <rdunlap@infradead.org>
Tested-by: Randy Dunlap <rdunlap@infradead.org>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
[jc: fixed up dma_pool_alloc() reference in dmapool.h]
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Link: https://lore.kernel.org/r/20250627101015.1600042-5-ptesarik@suse.com
Documentation/core-api/mm-api.rst
include/linux/dmapool.h

index af8151db88b28cc47d2f01ff08b0c9775a61acba..a61766328ac06d35982fe0b723560f169a2d22b2 100644 (file)
@@ -97,6 +97,8 @@ DMA pools
 .. kernel-doc:: mm/dmapool.c
    :export:
 
+.. kernel-doc:: include/linux/dmapool.h
+
 More Memory Management Functions
 ================================
 
index 06c4de602b2f3c2e9acfaa9bbb7d04756deb81f1..7d40b51933d1a1f49983ccbe2fe3a4807720aae4 100644 (file)
@@ -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)
 {