Patchwork mlx4: Fix kcalloc parameters swapped

login
register
mail settings
Submitter Axel Lin
Date Feb. 13, 2012, 1:14 a.m.
Message ID <1329095679.3066.1.camel@phoenix>
Download mbox | patch
Permalink /patch/140844/
State Accepted
Delegated to: David Miller
Headers show

Comments

Axel Lin - Feb. 13, 2012, 1:14 a.m.
The first parameter should be "number of elements" and the second parameter
should be "element size".

Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
 drivers/net/ethernet/mellanox/mlx4/eq.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
David Miller - Feb. 13, 2012, 9:02 p.m.
From: Axel Lin <axel.lin@gmail.com>
Date: Mon, 13 Feb 2012 09:14:39 +0800

> The first parameter should be "number of elements" and the second parameter
> should be "element size".
> 
> Signed-off-by: Axel Lin <axel.lin@gmail.com>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/eq.c b/drivers/net/ethernet/mellanox/mlx4/eq.c
index 55d7bd4..8fa41f3 100644
--- a/drivers/net/ethernet/mellanox/mlx4/eq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/eq.c
@@ -815,8 +815,9 @@  int mlx4_init_eq_table(struct mlx4_dev *dev)
 	int err;
 	int i;
 
-	priv->eq_table.uar_map = kcalloc(sizeof *priv->eq_table.uar_map,
-					 mlx4_num_eq_uar(dev), GFP_KERNEL);
+	priv->eq_table.uar_map = kcalloc(mlx4_num_eq_uar(dev),
+					 sizeof *priv->eq_table.uar_map,
+					 GFP_KERNEL);
 	if (!priv->eq_table.uar_map) {
 		err = -ENOMEM;
 		goto err_out_free;