Searched hist:"04 aadf36" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/jffs2/ |
H A D | dir.c | 04aadf36 Sun Oct 17 14:56:15 CDT 2010 Julia Lawall <julia@diku.dk> jffs2: use kmemdup
Convert a sequence of kmalloc and memcpy to use kmemdup.
The semantic patch that performs this transformation is: (http://coccinelle.lip6.fr/)
// <smpl> @@ expression a,flag,len; expression arg,e1,e2; statement S; @@
a = - \(kmalloc\|kzalloc\)(len,flag) + kmemdup(arg,len,flag) <... when != a if (a == NULL || ...) S ...> - memcpy(a,arg,len+1); // </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com> 04aadf36 Sun Oct 17 14:56:15 CDT 2010 Julia Lawall <julia@diku.dk> jffs2: use kmemdup Convert a sequence of kmalloc and memcpy to use kmemdup. The semantic patch that performs this transformation is: (http://coccinelle.lip6.fr/) // <smpl> @@ expression a,flag,len; expression arg,e1,e2; statement S; @@ a = - \(kmalloc\|kzalloc\)(len,flag) + kmemdup(arg,len,flag) <... when != a if (a == NULL || ...) S ...> - memcpy(a,arg,len+1); // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
|