summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2016-08-02 14:04:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-08-02 19:35:12 -0400
commitcec3aaa56638c7aad763630b9cbe591f2e791a3b (patch)
tree006d1ba5d40be90b6f584331e9568a1e4185178c /scripts
parentaab38f516aa99e8132f906a526bf44fa59e9daa3 (diff)
downloadlinux-cec3aaa56638c7aad763630b9cbe591f2e791a3b.tar.gz
linux-cec3aaa56638c7aad763630b9cbe591f2e791a3b.tar.bz2
linux-cec3aaa56638c7aad763630b9cbe591f2e791a3b.zip
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/1468707033-16173-1-git-send-email-tomas.winkler@intel.com Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Acked-by: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/checkpatch.pl5
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",