[ovs-dev] [PATCH] checkpatch: Fix mis-flagging of division operators as lacking whitespace.
Ben Pfaff
blp at ovn.org
Tue Apr 3 18:23:26 UTC 2018
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 <blp at ovn.org>
---
utilities/checkpatch.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utilities/checkpatch.py b/utilities/checkpatch.py
index 9a83afbdeeaa..0f389052c1f9 100755
--- a/utilities/checkpatch.py
+++ b/utilities/checkpatch.py
@@ -472,7 +472,7 @@ infix_operators = \
'&=', '^=', '|=', '<<=', '>>=']] \
+ ['[^<" ]<[^=" ]', '[^->" ]>[^=" ]', '[^ !()/"]\*[^/]', '[^ !&()"]&',
'[^" +(]\+[^"+;]', '[^" -(]-[^"->;]', '[^" <>=!^|+\-*/%&]=[^"=]',
- '[^*]/[^*]']
+ '[^* ]/[^* ]']
checks += [
{'regex': '(\.c|\.h)(\.in)?$', 'match_name': None,
'prereq': lambda x: not is_comment_line(x),
--
2.16.1
More information about the dev
mailing list