]> git.proxmox.com Git - ovs.git/commitdiff
checkpatch: Avoid warnings for /* or */.
authorBen Pfaff <blp@ovn.org>
Sat, 24 Mar 2018 18:17:17 +0000 (11:17 -0700)
committerBen Pfaff <blp@ovn.org>
Sat, 31 Mar 2018 19:36:22 +0000 (12:36 -0700)
checkpatch would sometimes confuse comment markers for operators.  This
fixes the problem.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Aaron Conole <aconole@redhat.com>
utilities/checkpatch.py

index 8a389524035748e5e3235ba785597f97f9e0a40e..71abfbc0eaed0cbe77a69fc4919e15bbef32e4f6 100755 (executable)
@@ -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),