Skip to content

Commit fc9a099

Browse files
ptesarikJonathan Corbet
authored andcommitted
docs: dma-api: add a kernel-doc comment for dma_pool_zalloc()
Document the dma_pool_zalloc() wrapper. Signed-off-by: Petr Tesarik <[email protected]> Reviewed-by: Randy Dunlap <[email protected]> Tested-by: Randy Dunlap <[email protected]> Acked-by: Marek Szyprowski <[email protected]> [jc: fixed up dma_pool_alloc() reference in dmapool.h] Signed-off-by: Jonathan Corbet <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6381b9d commit fc9a099

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

Documentation/core-api/mm-api.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,8 @@ DMA pools
9797
.. kernel-doc:: mm/dmapool.c
9898
:export:
9999

100+
.. kernel-doc:: include/linux/dmapool.h
101+
100102
More Memory Management Functions
101103
================================
102104

include/linux/dmapool.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,14 @@ static inline struct dma_pool *dma_pool_create(const char *name,
6060
NUMA_NO_NODE);
6161
}
6262

63+
/**
64+
* dma_pool_zalloc - Get a zero-initialized block of DMA coherent memory.
65+
* @pool: dma pool that will produce the block
66+
* @mem_flags: GFP_* bitmask
67+
* @handle: pointer to dma address of block
68+
*
69+
* Same as dma_pool_alloc(), but the returned memory is zeroed.
70+
*/
6371
static inline void *dma_pool_zalloc(struct dma_pool *pool, gfp_t mem_flags,
6472
dma_addr_t *handle)
6573
{

0 commit comments

Comments
 (0)