diff options
author | Ben Pfaff <blp@ovn.org> | 2018-03-24 11:17:17 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-03-31 12:36:22 -0700 |
commit | bbb2cb209a76e7640ba93b91a0cbbe955fb16056 (patch) | |
tree | 7039a786cdb4038c16ed30fcec93df3c6009af5a | |
parent | 828129d9271da18c2742648aa910e1fe399bb8db (diff) | |
download | openvswitch-bbb2cb209a76e7640ba93b91a0cbbe955fb16056.tar.gz |
checkpatch: Avoid warnings for /* or */.
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>
-rwxr-xr-x | utilities/checkpatch.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py index 8a3895240..71abfbc0e 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), |