checkpatch would sometimes confuse comment markers for operators.  This
fixes the problem.

Signed-off-by: Ben Pfaff <[email protected]>
---
 utilities/checkpatch.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 8a3895240357..71abfbc0eaed 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -319,11 +319,12 @@ def regex_operator_factory(operator):
 
 
 infix_operators = \
-    [re.escape(op) for op in ['/', '%', '<<', '>>', '<=', '>=', '==', '!=',
+    [re.escape(op) for op in ['%', '<<', '>>', '<=', '>=', '==', '!=',
             '^', '|', '&&', '||', '?:', '=', '+=', '-=', '*=', '/=', '%=',
             '&=', '^=', '|=', '<<=', '>>=']] \
     + ['[^<" ]<[^=" ]', '[^->" ]>[^=" ]', '[^ !()/"]\*[^/]', '[^ !&()"]&',
-       '[^" +(]\+[^"+;]', '[^" -(]-[^"->;]', '[^" <>=!^|+\-*/%&]=[^"=]']
+       '[^" +(]\+[^"+;]', '[^" -(]-[^"->;]', '[^" <>=!^|+\-*/%&]=[^"=]',
+       '[^*]/[^*]']
 checks += [
     {'regex': '(\.c|\.h)(\.in)?$', 'match_name': None,
      'prereq': lambda x: not is_comment_line(x),
-- 
2.16.1

_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to