diff mbox

gro: Fix kcalloc argument order

Message ID 1359228259.2079.30.camel@joe-AO722
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Joe Perches Jan. 26, 2013, 7:24 p.m. UTC
First number, then size.

Signed-off-by: Joe Perches <joe@perches.com>
---
 include/net/gro_cells.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)



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

Comments

David Miller Jan. 28, 2013, 12:13 a.m. UTC | #1
From: Joe Perches <joe@perches.com>
Date: Sat, 26 Jan 2013 11:24:19 -0800

> First number, then size.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Good catch, since this bug doesn't cause any real functional problem
I've applied the patch to net-next.

Thanks.
--
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
diff mbox

Patch

diff --git a/include/net/gro_cells.h b/include/net/gro_cells.h
index e5062c9..734d9b5 100644
--- a/include/net/gro_cells.h
+++ b/include/net/gro_cells.h
@@ -73,8 +73,8 @@  static inline int gro_cells_init(struct gro_cells *gcells, struct net_device *de
 	int i;
 
 	gcells->gro_cells_mask = roundup_pow_of_two(netif_get_num_default_rss_queues()) - 1;
-	gcells->cells = kcalloc(sizeof(struct gro_cell),
-				gcells->gro_cells_mask + 1,
+	gcells->cells = kcalloc(gcells->gro_cells_mask + 1,
+				sizeof(struct gro_cell),
 				GFP_KERNEL);
 	if (!gcells->cells)
 		return -ENOMEM;