lkml.org 
[lkml]   [2005]   [Aug]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kernel: use kcalloc instead kmalloc/memset
Pekka Enberg <penberg@cs.helsinki.fi> wrote:
>
> This patch converts kernel/ to use kcalloc instead of kmalloc/memset.
>

grr.

> - struct resource *res = kmalloc(sizeof(*res), GFP_KERNEL);
> + struct resource *res = kcalloc(1, sizeof(*res), GFP_KERNEL);

Notice how every conversion you did passes in `1' in the first argument?

And that's going to happen again and again and again. Each callsite
needlessly passing that silly third argument, adding more kernel text.

If we're going to do this, we should add a two-arg helper function first,
and use that, no?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-08-05 07:44    [from the cache]
©2003-2011 Jasper Spaans