From: Navya Sri Nizamkari Date: Sun, 1 Mar 2015 07:38:00 +0000 (+0530) Subject: staging: lustre: Use kasprintf. X-Git-Tag: omap-for-v4.2/o2_dc~155^2~138^2~846 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95745e9b1de24fc682a47080124819e1808c3a17;p=pandora-kernel.git staging: lustre: Use kasprintf. This patch uses kasprintf as it combines kmalloc and sprintf, and takes care of the size calculation itself. The semantic patch that makes this change 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: Navya Sri Nizamkari Acked-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed