From e31a0e62803c64cab5e150b94c31364a1ce1d0fd Mon Sep 17 00:00:00 2001 From: Vaishali Thakkar Date: Thu, 23 Oct 2014 13:27:46 +0530 Subject: [PATCH] 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-format-patch failed