Skip to content

Commit

Permalink
checkpatch: Avoid warnings for /* or */.
Browse files Browse the repository at this point in the history
checkpatch would sometimes confuse comment markers for operators.  This
fixes the problem.

Signed-off-by: Ben Pfaff <[email protected]>
Acked-by: Aaron Conole <[email protected]>
  • Loading branch information
blp committed Mar 31, 2018
1 parent 828129d commit bbb2cb2
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utilities/checkpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit bbb2cb2

Please sign in to comment.