Coccinelle: ifnullfree: Trim the warning reported in report mode
authorHimanshu Jha <himanshujha199640@gmail.com>
Sat, 13 Jan 2018 15:58:15 +0000 (21:28 +0530)
committerMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 16 Jan 2018 14:39:55 +0000 (23:39 +0900)
Remove the unncessary part of the warning reported, in the report
mode, so that a single warning produced does not exceed more than line
and hence improve readability of the warnings produced in the subsequent
reports to a file.

Signed-off-by: Himanshu Jha <himanshujha199640@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
scripts/coccinelle/free/ifnullfree.cocci

index 14a4cd9..a70e123 100644 (file)
@@ -55,5 +55,5 @@ cocci.print_main("NULL check before that freeing function is not needed", p)
 p << r.p;
 @@
 
-msg = "WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values."
+msg = "WARNING: NULL check before some freeing functions is not needed."
 coccilib.report.print_report(p[0], msg)