From: Tomas Winkler Date: Tue, 2 Aug 2016 21:04:39 +0000 (-0700) Subject: checkpatch: don't complain about BIT macro in uapi X-Git-Tag: v4.8-rc1~52^2~58 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=cec3aaa56638c7aad763630b9cbe591f2e791a3b;p=linux.git 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 Acked-by: Joe Perches Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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 << 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 << 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",