Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

RDMA/erdma: Remove unnecessary __GFP_ZERO flag

The dma_alloc_coherent() interface automatically zero the memory returned.
Thus, we do not need to specify the __GFP_ZERO flag explicitly when we call
dma_alloc_coherent().

Reviewed-by: Cheng Xu <chengyou@linux.alibaba.com>
Signed-off-by: Boshi Yu <boshiyu@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240311113821.22482-4-boshiyu@alibaba-inc.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>

authored by

Boshi Yu and committed by
Leon Romanovsky
df0e16ba fdb09ed1

+4 -8
+2 -4
drivers/infiniband/hw/erdma/erdma_cmdq.c
··· 127 127 128 128 cq->depth = cmdq->sq.depth; 129 129 cq->qbuf = dma_alloc_coherent(&dev->pdev->dev, cq->depth << CQE_SHIFT, 130 - &cq->qbuf_dma_addr, 131 - GFP_KERNEL | __GFP_ZERO); 130 + &cq->qbuf_dma_addr, GFP_KERNEL); 132 131 if (!cq->qbuf) 133 132 return -ENOMEM; 134 133 ··· 161 162 162 163 eq->depth = cmdq->max_outstandings; 163 164 eq->qbuf = dma_alloc_coherent(&dev->pdev->dev, eq->depth << EQE_SHIFT, 164 - &eq->qbuf_dma_addr, 165 - GFP_KERNEL | __GFP_ZERO); 165 + &eq->qbuf_dma_addr, GFP_KERNEL); 166 166 if (!eq->qbuf) 167 167 return -ENOMEM; 168 168
+2 -4
drivers/infiniband/hw/erdma/erdma_eq.c
··· 87 87 eq->depth = ERDMA_DEFAULT_EQ_DEPTH; 88 88 89 89 eq->qbuf = dma_alloc_coherent(&dev->pdev->dev, eq->depth << EQE_SHIFT, 90 - &eq->qbuf_dma_addr, 91 - GFP_KERNEL | __GFP_ZERO); 90 + &eq->qbuf_dma_addr, GFP_KERNEL); 92 91 if (!eq->qbuf) 93 92 return -ENOMEM; 94 93 ··· 236 237 237 238 eq->depth = ERDMA_DEFAULT_EQ_DEPTH; 238 239 eq->qbuf = dma_alloc_coherent(&dev->pdev->dev, eq->depth << EQE_SHIFT, 239 - &eq->qbuf_dma_addr, 240 - GFP_KERNEL | __GFP_ZERO); 240 + &eq->qbuf_dma_addr, GFP_KERNEL); 241 241 if (!eq->qbuf) 242 242 return -ENOMEM; 243 243