From: Vaishali Thakkar Date: Thu, 23 Oct 2014 07:57:46 +0000 (+0530) Subject: Staging: vme: devices: Use kasprintf X-Git-Tag: omap-for-v3.20/drop-legacy-3517~70^2~1034 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e31a0e62803c64cab5e150b94c31364a1ce1d0fd;p=pandora-kernel.git Staging: vme: devices: Use kasprintf This patch uses kasprintf which combines kmalloc and sprintf. kasprintf also takes care of the size calculation. This is done using Coccinelle. Semantic patch used is as follows: @@ 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: Vaishali Thakkar Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed