diff options
author | Luis Chamberlain <mcgrof@kernel.org> | 2018-12-19 12:30:34 -0800 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-01-08 07:58:49 -0500 |
commit | dfd32cad146e3624970eee9329e99d2c6ef751b3 (patch) | |
tree | 7d72650db6c1fe3ee4122edccc0af7b1b264e369 /include/linux | |
parent | 07a85fe14254e01bcf37f4d2e0a13f093378620b (diff) |
dma-mapping: remove dma_zalloc_coherent()
dma_zalloc_coherent() is no longer needed as it has no users because
dma_alloc_coherent() already zeroes out memory for us.
The Coccinelle grammar rule that used to check for dma_alloc_coherent()
+ memset() is modified so that it just tells the user that the memset is
not needed anymore.
Suggested-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Luis Chamberlain <mcgrof@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dma-mapping.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index cef2127e1d70..f6ded992c183 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -717,15 +717,6 @@ static inline unsigned long dma_max_pfn(struct device *dev) } #endif -/* - * Please always use dma_alloc_coherent instead as it already zeroes the memory! - */ -static inline void *dma_zalloc_coherent(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t flag) -{ - return dma_alloc_coherent(dev, size, dma_handle, flag); -} - static inline int dma_get_cache_alignment(void) { #ifdef ARCH_DMA_MINALIGN |