Skip to content

Commit

Permalink
checkpatch: Fix mis-flagging of division operators as lacking whitesp…
Browse files Browse the repository at this point in the history
…ace.

The regular expression here would flag any slash that wasn't adjacent to
an asterisk as missing whitespace.  This fixes the problem.

Signed-off-by: Ben Pfaff <[email protected]>
Tested-by: Aaron Conole <[email protected]>
  • Loading branch information
blp committed Apr 3, 2018
1 parent 44c8281 commit 0056086
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utilities/checkpatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ def regex_operator_factory(operator):
'&=', '^=', '|=', '<<=', '>>=']] \
+ ['[^<" ]<[^=" ]', '[^->" ]>[^=" ]', '[^ !()/"]\*[^/]', '[^ !&()"]&',
'[^" +(]\+[^"+;]', '[^" -(]-[^"->;]', '[^" <>=!^|+\-*/%&]=[^"=]',
'[^*]/[^*]']
'[^* ]/[^* ]']
checks += [
{'regex': '(\.c|\.h)(\.in)?$', 'match_name': None,
'prereq': lambda x: not is_comment_line(x),
Expand Down

0 comments on commit 0056086

Please sign in to comment.