From: Julia Lawall Date: Wed, 10 Mar 2010 11:15:01 +0000 (+0000) Subject: powerpc/pseries/dlpar: Use kasprintf X-Git-Tag: v2.6.35-rc1~450^2~74 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=43caa61f154da85a620965f3f61c2f45366d8dc7;p=pandora-kernel.git powerpc/pseries/dlpar: 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 Acked-by: Nathan Fontenot Signed-off-by: Benjamin Herrenschmidt --- Reading git-diff-tree failed