[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <741d9946-ff30-1df1-1de0-592621531387@mellanox.com>
Date: Sun, 30 Jun 2019 12:19:49 +0000
From: Tariq Toukan <tariqt@...lanox.com>
To: Fuqian Huang <huangfq.daxian@...il.com>
CC: "David S. Miller" <davem@...emloft.net>,
Derek Chickles <dchickles@...vell.com>,
Satanand Burla <sburla@...vell.com>,
Felix Manlunas <fmanlunas@...vell.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>
Subject: Re: [PATCH v2 15/27] net: use zeroing allocator rather than allocator
followed by memset zero
On 6/28/2019 5:48 AM, Fuqian Huang wrote:
> Replace allocator followed by memset with 0 with zeroing allocator.
>
> Signed-off-by: Fuqian Huang <huangfq.daxian@...il.com>
> ---
..
> --- 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);
>
For the mlx4 part:
Reviewed-by: Tariq Toukan <tariqt@...lanox.com>
Tariq
Powered by blists - more mailing lists