linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mlx4: Fix kcalloc parameters swapped
@ 2012-02-13  1:14 Axel Lin
  2012-02-13 21:02 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2012-02-13  1:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: David S. Miller, Jack Morgenstein, netdev

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(-)

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;
-- 
1.7.5.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] mlx4: Fix kcalloc parameters swapped
  2012-02-13  1:14 [PATCH] mlx4: Fix kcalloc parameters swapped Axel Lin
@ 2012-02-13 21:02 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2012-02-13 21:02 UTC (permalink / raw)
  To: axel.lin; +Cc: linux-kernel, jackm, netdev

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-13 21:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-13  1:14 [PATCH] mlx4: Fix kcalloc parameters swapped Axel Lin
2012-02-13 21:02 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).