mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
07a85fe142
commit
dfd32cad14
3 changed files with 5 additions and 23 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue