From: Julia Lawall Date: Wed, 10 Mar 2010 21:15:19 +0000 (+0100) Subject: mtd: block2mtd: Use kasprintf X-Git-Tag: v2.6.35-rc1~465^2~75 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d682420cead1ce06d8cd44ae193414404f0e7f5;p=pandora-kernel.git mtd: block2mtd: 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/) // @@ expression a,flag; expression list args; statement S; @@ a = - \(kmalloc\|kzalloc\)(...,flag) + kasprintf(flag,args) <... when != a if (a == NULL || ...) S ...> - sprintf(a,args); // Signed-off-by: Julia Lawall Signed-off-by: David Woodhouse --- Reading git-diff-tree failed