[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <420481d3-0ec7-3990-30b3-0ef2118e5be8@users.sourceforge.net>
Date: Tue, 3 Jul 2018 09:35:26 +0200
From: SF Markus Elfring <elfring@...rs.sourceforge.net>
To: Elena Reshetova <elena.reshetova@...el.com>,
Julia Lawall <julia.lawall@...6.fr>,
Kees Cook <keescook@...omium.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
kernel-janitors@...r.kernel.org
Cc: LKML <linux-kernel@...r.kernel.org>,
Coccinelle <cocci@...teme.lip6.fr>
Subject: [PATCH 1/6] Coccinelle: atomic_as_refcounter: Omit placeholder
specifications from two SmPL constraints
From: Markus Elfring <elfring@...rs.sourceforge.net>
Date: Mon, 2 Jul 2018 16:33:46 +0200
A string was enclosed by placeholder specifications for
regular expressions as constraints for metavariables in a script
for the semantic patch language.
The desired search functionality can be achieved also without
the notation “.*”. Thus delete it.
Signed-off-by: Markus Elfring <elfring@...rs.sourceforge.net>
---
scripts/coccinelle/api/atomic_as_refcounter.cocci | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/scripts/coccinelle/api/atomic_as_refcounter.cocci b/scripts/coccinelle/api/atomic_as_refcounter.cocci
index 988120e0fd67..94373a35744e 100644
--- a/scripts/coccinelle/api/atomic_as_refcounter.cocci
+++ b/scripts/coccinelle/api/atomic_as_refcounter.cocci
@@ -12,7 +12,7 @@ virtual report
@r1 exists@
identifier a, x;
position p1, p2;
-identifier fname =~ ".*free.*";
+identifier fname =~ "free";
identifier fname2 =~ ".*destroy.*";
identifier fname3 =~ ".*del.*";
identifier fname4 =~ ".*queue_work.*";
@@ -60,8 +60,7 @@ coccilib.report.print_report(p1[0], msg % (p2[0].line))
@r4 exists@
identifier a, x, y;
position p1, p2;
-identifier fname =~ ".*free.*";
-
+identifier fname =~ "free";
@@
(
--
2.18.0
Powered by blists - more mailing lists