[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100517122332.04cfa06a@mschwide.boeblingen.de.ibm.com>
Date: Mon, 17 May 2010 12:23:32 +0200
From: Martin Schwidefsky <schwidefsky@...ibm.com>
To: Julia Lawall <julia@...u.dk>
Cc: Heiko Carstens <heiko.carstens@...ibm.com>, linux390@...ibm.com,
linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH 23/37] drivers/s390/char: Use kmemdup
On Sat, 15 May 2010 23:20:07 +0200 (CEST)
Julia Lawall <julia@...u.dk> wrote:
> From: Julia Lawall <julia@...u.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@...u.dk>
Added to git390 as well, thanks again.
--
blue skies,
Martin.
"Reality continues to ruin my life." - Calvin.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists