mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-05-01 15:15:19 -04:00
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>
This commit is contained in:
committed by
Leon Romanovsky
parent
fdb09ed15f
commit
df0e16bab5
@@ -127,8 +127,7 @@ static int erdma_cmdq_cq_init(struct erdma_dev *dev)
|
||||
|
||||
cq->depth = cmdq->sq.depth;
|
||||
cq->qbuf = dma_alloc_coherent(&dev->pdev->dev, cq->depth << CQE_SHIFT,
|
||||
&cq->qbuf_dma_addr,
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
&cq->qbuf_dma_addr, GFP_KERNEL);
|
||||
if (!cq->qbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -162,8 +161,7 @@ static int erdma_cmdq_eq_init(struct erdma_dev *dev)
|
||||
|
||||
eq->depth = cmdq->max_outstandings;
|
||||
eq->qbuf = dma_alloc_coherent(&dev->pdev->dev, eq->depth << EQE_SHIFT,
|
||||
&eq->qbuf_dma_addr,
|
||||
GFP_KERNEL | __GFP_ZERO);
|
||||
&eq->qbuf_dma_addr, GFP_KERNEL);
|
||||
if (!eq->qbuf)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user