diff options
author | Julia Lawall <julia@diku.dk> | 2010-05-17 08:00:23 (GMT) |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-05-17 08:00:18 (GMT) |
commit | 939e379e9e183ae6291ac7caa4a5e1dfadae4ccc (patch) | |
tree | 959e2c54ca203d6ffef74687bc9371f0c86cccda /arch | |
parent | 777a5510093a6d6443351160c6969a0e66f3ba8a (diff) | |
download | linux-fsl-qoriq-939e379e9e183ae6291ac7caa4a5e1dfadae4ccc.tar.xz |
[S390] drivers/s390/char: Use kmemdup
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>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions