[ovs-dev] [PATCH] checkpatch: Be more careful about checking function names.

Ben Pfaff blp at ovn.org
Fri May 26 18:32:22 UTC 2017


This code would complain about the use of ovs_strerror because it
matches [^x]strerror, and the same was true in many other similar cases.

Signed-off-by: Ben Pfaff <blp at ovn.org>
---
 utilities/checkpatch.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index ec4b79e599df..945209da769c 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -219,7 +219,7 @@ checks = [
 
 
 def regex_function_factory(func_name):
-    regex = re.compile('[^x]%s\([^)]*\)' % func_name)
+    regex = re.compile(r'\b%s\([^)]*\)' % func_name)
     return lambda x: regex.search(x) is not None
 
 
-- 
2.10.2



More information about the dev mailing list