From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933440AbcL0RlC (ORCPT ); Tue, 27 Dec 2016 12:41:02 -0500 Received: from mx1.polytechnique.org ([129.104.30.34]:34682 "EHLO mx1.polytechnique.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933010AbcL0Rkv (ORCPT ); Tue, 27 Dec 2016 12:40:51 -0500 From: Nicolas Iooss To: Julia Lawall , Gilles Muller , Nicolas Palix , Michal Marek , cocci@systeme.lip6.fr Cc: linux-kernel@vger.kernel.org, Nicolas Iooss Subject: [PATCH 1/1] Coccinelle: memdup: fix the report mode Date: Tue, 27 Dec 2016 18:39:40 +0100 Message-Id: <20161227173940.8327-1-nicolas.iooss_linux@m4x.org> X-Mailer: git-send-email 2.11.0 X-AV-Checked: ClamAV using ClamSMTP at svoboda.polytechnique.org (Tue Dec 27 18:40:48 2016 +0100 (CET)) X-Spam-Flag: No, tests=bogofilter, spamicity=0.000008, queueID=491A0560790 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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