[PATCH v2 2/8] Coccinelle: atomic_as_refcounter: Omit placeholder specifications from a SmPL constraint

From: SF Markus Elfring
Date: Mon Jul 16 2018 - 13:27:07 EST


From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Jul 2018 17:34:56 +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 at a specific place.

Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
---
scripts/coccinelle/api/atomic_as_refcounter.cocci | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/coccinelle/api/atomic_as_refcounter.cocci b/scripts/coccinelle/api/atomic_as_refcounter.cocci
index 61fcaf5e45a3..46d27b2b1dff 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.*";
--
2.18.0