diff options
author | Tomas Winkler <[email protected]> | 2016-08-02 14:04:39 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2016-08-02 19:35:12 -0400 |
commit | cec3aaa56638c7aad763630b9cbe591f2e791a3b (patch) | |
tree | 006d1ba5d40be90b6f584331e9568a1e4185178c | |
parent | aab38f516aa99e8132f906a526bf44fa59e9daa3 (diff) |
checkpatch: don't complain about BIT macro in uapi
BIT macro cannot be exported to UAPI, don't complain about it.
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Tomas Winkler <[email protected]>
Acked-by: Joe Perches <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-x | scripts/checkpatch.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 7a28775274a5..77915e095022 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -5732,8 +5732,9 @@ sub process { } } -# check for #defines like: 1 << <digit> that could be BIT(digit) - if ($line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { +# check for #defines like: 1 << <digit> that could be BIT(digit), it is not exported to uapi + if ($realfile !~ m@^include/uapi/@ && + $line =~ /#\s*define\s+\w+\s+\(?\s*1\s*([ulUL]*)\s*\<\<\s*(?:\d+|$Ident)\s*\)?/) { my $ull = ""; $ull = "_ULL" if (defined($1) && $1 =~ /ll/i); if (CHK("BIT_MACRO", |