From: Julia Lawall Date: Tue, 27 Apr 2010 21:06:04 +0000 (-0700) Subject: drivers/acpi: use kasprintf X-Git-Tag: v2.6.35-rc1~20^2~1^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aeb834d95e771499cb0492d127aec3246d1595c8;p=pandora-kernel.git drivers/acpi: 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); // [akpm@linux-foundation.org: don't change handling of `count'] Signed-off-by: Julia Lawall Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- Reading git-diff-tree failed