[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20190627174245.4877-1-huangfq.daxian@gmail.com>
Date: Fri, 28 Jun 2019 01:42:45 +0800
From: Fuqian Huang <huangfq.daxian@...il.com>
To: unlisted-recipients:; (no To-header on input)
Cc: Fuqian Huang <huangfq.daxian@...il.com>,
Tariq Toukan <tariqt@...lanox.com>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 86/87] ethernet: mellanox:mlx4: replace kmalloc and memset with kzalloc
kmalloc + memset(0) -> kzalloc
Signed-off-by: Fuqian Huang <huangfq.daxian@...il.com>
---
drivers/net/ethernet/mellanox/mlx4/en_rx.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_rx.c b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
index 6c01314e87b0..f1dff5c47676 100644
--- a/drivers/net/ethernet/mellanox/mlx4/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_rx.c
@@ -1062,7 +1062,7 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, int qpn,
struct mlx4_qp_context *context;
int err = 0;
- context = kmalloc(sizeof(*context), GFP_KERNEL);
+ context = kzalloc(sizeof(*context), GFP_KERNEL);
if (!context)
return -ENOMEM;
@@ -1073,7 +1073,6 @@ static int mlx4_en_config_rss_qp(struct mlx4_en_priv *priv, int qpn,
}
qp->event = mlx4_en_sqp_event;
- memset(context, 0, sizeof(*context));
mlx4_en_fill_qp_context(priv, ring->actual_size, ring->stride, 0, 0,
qpn, ring->cqn, -1, context);
context->db_rec_addr = cpu_to_be64(ring->wqres.db.dma);
--
2.11.0
Powered by blists - more mailing lists