Re: [for-next 01/11] net/mlx5: E-Switch, Refactor vport representors initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Saeed Mahameed <saeedm@xxxxxxxxxxxx>
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux