From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755181AbcL0Ro4 (ORCPT ); Tue, 27 Dec 2016 12:44:56 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:25847 "EHLO mail3-relais-sop.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753020AbcL0Ror (ORCPT ); Tue, 27 Dec 2016 12:44:47 -0500 X-IronPort-AV: E=Sophos;i="5.33,417,1477954800"; d="scan'208";a="206169779" Date: Tue, 27 Dec 2016 18:43:48 +0100 (CET) From: Julia Lawall X-X-Sender: jll@hadrien To: Nicolas Iooss cc: Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] Coccinelle: memdup: fix the report mode In-Reply-To: <20161227173940.8327-1-nicolas.iooss_linux@m4x.org> Message-ID: References: <20161227173940.8327-1-nicolas.iooss_linux@m4x.org> 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 On Tue, 27 Dec 2016, Nicolas Iooss wrote: > The pattern which was used in report mode included an annoying kmemdup > call, which has no chance of being there. Remove this stray line. > > While at it, the name of function kmemdup was misspelled in the warning > message. Fix this. > > Fixes: 29a36d4dec6c ("scripts/coccinelle: improve the coverage of some > semantic patches") > Signed-off-by: Nicolas Iooss Acked-by: Julia Lawall Thanks for the fixes. julia > --- > scripts/coccinelle/api/memdup.cocci | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/scripts/coccinelle/api/memdup.cocci b/scripts/coccinelle/api/memdup.cocci > index 3d1aa71b7579..8fd6437beda8 100644 > --- a/scripts/coccinelle/api/memdup.cocci > +++ b/scripts/coccinelle/api/memdup.cocci > @@ -49,7 +49,6 @@ statement S; > @@ > > * to = \(kmalloc@p\|kzalloc@p\)(size,flag); > - to = kmemdup(from,size,flag); > if (to==NULL || ...) S > * memcpy(to, from, size); > > @@ -57,10 +56,10 @@ statement S; > p << r.p; > @@ > > -coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdep") > +coccilib.org.print_todo(p[0], "WARNING opportunity for kmemdup") > > @script:python depends on report@ > p << r.p; > @@ > > -coccilib.report.print_report(p[0], "WARNING opportunity for kmemdep") > +coccilib.report.print_report(p[0], "WARNING opportunity for kmemdup") > -- > 2.11.0 > >