staging: lustre: Use kasprintf.
authorNavya Sri Nizamkari <navyasri.tech@gmail.com>
Sun, 1 Mar 2015 07:38:00 +0000 (13:08 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 1 Mar 2015 23:13:27 +0000 (15:13 -0800)
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:

// <smpl>
@@
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 <navyasri.tech@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/llite/llite_lib.c