Powered by Linux
[PATCH] check_kvmalloc_NOFS: Report the correct function name that triggered the warning — Semantic Matching Tool

[PATCH] check_kvmalloc_NOFS: Report the correct function name that triggered the warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The warning message has a hard-coded 'kvmalloc' but several other functions
can trigger this warning.
So, report the correct function name to be less puzzling.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
 check_kvmalloc_NOFS.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/check_kvmalloc_NOFS.c b/check_kvmalloc_NOFS.c
index c32f6805b78e..fba9564e84fa 100644
--- a/check_kvmalloc_NOFS.c
+++ b/check_kvmalloc_NOFS.c
@@ -33,7 +33,7 @@ static void match_alloc(const char *fn, struct expression *expr, void *_arg)
 	    !(sval.uvalue & GFP_ATOMIC()))
 		return;
 
-	sm_error("kvmalloc() does not make sense for no sleep code");
+	sm_error("%s() does not make sense for no sleep code", fn);
 }
 
 void check_kvmalloc_NOFS(int id)
-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux