[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20171220.125734.63810464667583004.davem@davemloft.net>
Date: Wed, 20 Dec 2017 12:57:34 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: saeedm@...lanox.com
Cc: dledford@...hat.com, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, leonro@...lanox.com, markb@...lanox.com
Subject: Re: [for-next 01/11] net/mlx5: E-Switch, Refactor vport
representors initialization
From: Saeed Mahameed <saeedm@...lanox.com>
Date: Tue, 19 Dec 2017 12:33:30 -0800
> +int esw_offloads_init_reps(struct mlx5_eswitch *esw)
> +{
> + struct mlx5_core_dev *dev = esw->dev;
> + struct mlx5_esw_offload *offloads;
> + struct mlx5_eswitch_rep *rep;
> + int total_vfs = MLX5_TOTAL_VPORTS(dev);
> + u8 hw_id[ETH_ALEN];
> + int vport;
Reverse christmas-tree please.
> + esw->offloads.vport_reps =
> + kcalloc(total_vfs, sizeof(struct mlx5_eswitch_rep),
> + GFP_KERNEL);
That looks really unpleasant:
x = kcalloc(y,
z, GFP_KERNEL);
would look so much nicer.
Powered by blists - more mailing lists