lkml.org 
[lkml]   [2010]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 23/37] drivers/s390/char: Use kmemdup
    On Sat, 15 May 2010 23:20:07 +0200 (CEST)
    Julia Lawall <julia@diku.dk> wrote:

    > From: Julia Lawall <julia@diku.dk>
    >
    > Use kmemdup when some other buffer is immediately copied into the
    > allocated region.
    >
    > A simplified version of the semantic patch that makes this change is as
    > follows: (http://coccinelle.lip6.fr/)
    >
    > // <smpl>
    > @@
    > expression from,to,size,flag;
    > statement S;
    > @@
    >
    > - to = \(kmalloc\|kzalloc\)(size,flag);
    > + to = kmemdup(from,size,flag);
    > if (to==NULL || ...) S
    > - memcpy(to, from, size);
    > // </smpl>
    >
    > Signed-off-by: Julia Lawall <julia@diku.dk>

    Added to git390 as well, thanks again.

    --
    blue skies,
    Martin.

    "Reality continues to ruin my life." - Calvin.



    \
     
     \ /
      Last update: 2010-05-17 12:27    [W:0.023 / U:0.280 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site