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


    > - 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
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-08-05 07:44    [W:0.021 / U:12.960 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site