diff options
author | Julia Lawall | 2010-03-10 22:18:13 +0100 |
---|---|---|
committer | Greg Kroah-Hartman | 2010-05-21 18:37:29 +0200 |
commit | 1653268b1b538981df9bb85d637456530938be6c (patch) | |
tree | f091543b753e57e975bee35909b96c674daf3bd3 /fs/ramfs | |
parent | Driver core: don't initialize wakeup flags (diff) | |
download | kernel-qcow2-linux-1653268b1b538981df9bb85d637456530938be6c.tar.gz kernel-qcow2-linux-1653268b1b538981df9bb85d637456530938be6c.tar.xz kernel-qcow2-linux-1653268b1b538981df9bb85d637456530938be6c.zip |
driver core: module.c: Use kasprintf
kasprintf combines kmalloc and sprintf, and takes care of the size
calculation itself.
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)
// <smpl>
@@
expression a,flag;
expression list args;
statement S;
@@
a =
- \(kmalloc\|kzalloc\)(...,flag)
+ kasprintf(flag,args)
<... when != a
if (a == NULL || ...) S
...>
- sprintf(a,args);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs/ramfs')
0 files changed, 0 insertions, 0 deletions