lkml.org 
[lkml]   [2018]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 1/6] Coccinelle: atomic_as_refcounter: Omit placeholder specifications from two SmPL constraints
From
Date
From: Markus Elfring <elfring@users.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@users.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
\
 
 \ /
  Last update: 2018-07-03 09:36    [W:0.136 / U:3.264 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site