Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1547709
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Nicolas Iooss <nicolas.iooss_linux@m4x.org> |
| Newsgroups | linux.kernel |
| Subject | [PATCH 1/1] Coccinelle: memdup: fix the report mode |
| Date | Tue, 27 Dec 2016 18:50:01 +0100 |
| Message-ID | <sT42R-56S-5@gated-at.bofh.it> (permalink) |
| 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 | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 40 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | linux-kernel@vger.kernel.org, Nicolas Iooss <nicolas.iooss_linux@m4x.org> |
| X-Original-Date | Tue, 27 Dec 2016 18:39:40 +0100 |
| X-Original-Message-ID | <20161227173940.8327-1-nicolas.iooss_linux@m4x.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1547709 |
Show key headers only | View raw
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 <nicolas.iooss_linux@m4x.org>
---
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 1/1] Coccinelle: memdup: fix the report mode Nicolas Iooss <nicolas.iooss_linux@m4x.org> - 2016-12-27 18:50 +0100
csiph-web