linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode
@ 2018-01-13 15:58 Himanshu Jha
  2018-01-13 16:28 ` Julia Lawall
  2018-01-16 14:34 ` Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Himanshu Jha @ 2018-01-13 15:58 UTC (permalink / raw)
  To: yamada.masahiro
  Cc: Julia.Lawall, Gilles.Muller, nicolas.palix, michal.lkml, cocci,
	linux-kernel, Himanshu Jha

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>
---
 scripts/coccinelle/free/ifnullfree.cocci | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccinelle/free/ifnullfree.cocci b/scripts/coccinelle/free/ifnullfree.cocci
index 14a4cd9..a70e123 100644
--- a/scripts/coccinelle/free/ifnullfree.cocci
+++ b/scripts/coccinelle/free/ifnullfree.cocci
@@ -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)
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode
  2018-01-13 15:58 [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode Himanshu Jha
@ 2018-01-13 16:28 ` Julia Lawall
  2018-01-16 14:34 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2018-01-13 16:28 UTC (permalink / raw)
  To: Himanshu Jha
  Cc: yamada.masahiro, Julia.Lawall, Gilles Muller, nicolas.palix,
	michal.lkml, cocci, linux-kernel



On Sat, 13 Jan 2018, Himanshu Jha wrote:

> 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>

> ---
>  scripts/coccinelle/free/ifnullfree.cocci | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/coccinelle/free/ifnullfree.cocci b/scripts/coccinelle/free/ifnullfree.cocci
> index 14a4cd9..a70e123 100644
> --- a/scripts/coccinelle/free/ifnullfree.cocci
> +++ b/scripts/coccinelle/free/ifnullfree.cocci
> @@ -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)
> --
> 2.7.4
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode
  2018-01-13 15:58 [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode Himanshu Jha
  2018-01-13 16:28 ` Julia Lawall
@ 2018-01-16 14:34 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2018-01-16 14:34 UTC (permalink / raw)
  To: Himanshu Jha
  Cc: Julia Lawall, Gilles Muller, Nicolas Palix, Michal Marek, cocci,
	Linux Kernel Mailing List

2018-01-14 0:58 GMT+09:00 Himanshu Jha <himanshujha199640@gmail.com>:
> 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>
> ---

Applied to linux-kbuild/misc. Thanks!

-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-01-16 14:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-13 15:58 [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode Himanshu Jha
2018-01-13 16:28 ` Julia Lawall
2018-01-16 14:34 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).