Commit 07a85fe1 authored by Luis Chamberlain's avatar Luis Chamberlain Committed by Christoph Hellwig
Browse files

cross-tree: phase out dma_zalloc_coherent() on headers



The last few stragglers coccinelle doesn't pick up are on driver
specific header files. Phase those out as well as dma_alloc_coherent()
zeroes out the memory as well now too.

Suggested-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarLuis Chamberlain <mcgrof@kernel.org>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
parent 750afb08
...@@ -2081,7 +2081,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id, ...@@ -2081,7 +2081,7 @@ void bnx2x_igu_clear_sb_gen(struct bnx2x *bp, u8 func, u8 idu_sb_id,
bool is_pf); bool is_pf);
#define BNX2X_ILT_ZALLOC(x, y, size) \ #define BNX2X_ILT_ZALLOC(x, y, size) \
x = dma_zalloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL) x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL)
#define BNX2X_ILT_FREE(x, y, size) \ #define BNX2X_ILT_FREE(x, y, size) \
do { \ do { \
......
...@@ -52,7 +52,7 @@ extern int bnx2x_num_queues; ...@@ -52,7 +52,7 @@ extern int bnx2x_num_queues;
#define BNX2X_PCI_ALLOC(y, size) \ #define BNX2X_PCI_ALLOC(y, size) \
({ \ ({ \
void *x = dma_zalloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \ void *x = dma_alloc_coherent(&bp->pdev->dev, size, y, GFP_KERNEL); \
if (x) \ if (x) \
DP(NETIF_MSG_HW, \ DP(NETIF_MSG_HW, \
"BNX2X_PCI_ALLOC: Physical %Lx Virtual %p\n", \ "BNX2X_PCI_ALLOC: Physical %Lx Virtual %p\n", \
......
...@@ -64,7 +64,7 @@ static inline int qmem_alloc(struct device *dev, struct qmem **q, ...@@ -64,7 +64,7 @@ static inline int qmem_alloc(struct device *dev, struct qmem **q,
qmem->entry_sz = entry_sz; qmem->entry_sz = entry_sz;
qmem->alloc_sz = (qsize * entry_sz) + OTX2_ALIGN; qmem->alloc_sz = (qsize * entry_sz) + OTX2_ALIGN;
qmem->base = dma_zalloc_coherent(dev, qmem->alloc_sz, qmem->base = dma_alloc_coherent(dev, qmem->alloc_sz,
&qmem->iova, GFP_KERNEL); &qmem->iova, GFP_KERNEL);
if (!qmem->base) if (!qmem->base)
return -ENOMEM; return -ENOMEM;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment