Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755312AbeAMQ2T (ORCPT + 1 other); Sat, 13 Jan 2018 11:28:19 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:21582 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754998AbeAMQ2S (ORCPT ); Sat, 13 Jan 2018 11:28:18 -0500 X-IronPort-AV: E=Sophos;i="5.46,354,1511823600"; d="scan'208";a="251104751" Date: Sat, 13 Jan 2018 17:28:07 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Himanshu Jha cc: yamada.masahiro@socionext.com, Julia.Lawall@lip6.fr, Gilles Muller , nicolas.palix@imag.fr, michal.lkml@markovi.net, cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Coccinelle: ifnullfree: Trim the warning reported in report mode In-Reply-To: <1515859095-31824-1-git-send-email-himanshujha199640@gmail.com> Message-ID: References: <1515859095-31824-1-git-send-email-himanshujha199640@gmail.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: 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 Acked-by: Julia Lawall > --- > 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 > >