lkml.org 
[lkml]   [2013]   [Jan]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] gro: Fix kcalloc argument order
From
Date
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(-)

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;



\
 
 \ /
  Last update: 2013-01-26 20:41    [W:0.036 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site