diff options
author | Boshi Yu <boshiyu@linux.alibaba.com> | 2024-03-11 19:38:21 +0800 |
---|---|---|
committer | Leon Romanovsky <leon@kernel.org> | 2024-04-01 14:46:01 +0300 |
commit | df0e16bab5c7f13d083484e0ab7488cc7ca510f1 (patch) | |
tree | 54fbf9fafd33d3e97e5e3ce696e89317cfb43f7d /drivers/infiniband/hw/erdma | |
parent | fdb09ed15f272adb7c0403f7a6f9b4db3959284d (diff) | |
download | linux-stable-df0e16bab5c7f13d083484e0ab7488cc7ca510f1.tar.gz linux-stable-df0e16bab5c7f13d083484e0ab7488cc7ca510f1.tar.bz2 linux-stable-df0e16bab5c7f13d083484e0ab7488cc7ca510f1.zip |
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>
Diffstat (limited to 'drivers/infiniband/hw/erdma')
-rw-r--r-- | drivers/infiniband/hw/erdma/erdma_cmdq.c | 6 | ||||
-rw-r--r-- | drivers/infiniband/hw/erdma/erdma_eq.c | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/erdma/erdma_cmdq.c b/drivers/infiniband/hw/erdma/erdma_cmdq.c index 0ac2683cfccf..43ff40b5a09d 100644 --- a/drivers/infiniband/hw/erdma/erdma_cmdq.c +++ b/drivers/infiniband/hw/erdma/erdma_cmdq.c @@ -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; diff --git a/drivers/infiniband/hw/erdma/erdma_eq.c b/drivers/infiniband/hw/erdma/erdma_eq.c index 0a4746e6d05c..84ccdd8144c9 100644 --- a/drivers/infiniband/hw/erdma/erdma_eq.c +++ b/drivers/infiniband/hw/erdma/erdma_eq.c @@ -87,8 +87,7 @@ int erdma_aeq_init(struct erdma_dev *dev) eq->depth = ERDMA_DEFAULT_EQ_DEPTH; 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; @@ -237,8 +236,7 @@ static int erdma_ceq_init_one(struct erdma_dev *dev, u16 ceqn) eq->depth = ERDMA_DEFAULT_EQ_DEPTH; 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; |