mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* + checkpatch-dont-complain-about-bit-macro-in-uapi.patch added to -mm tree
@ 2016-07-19 23:02 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2016-07-19 23:02 UTC (permalink / raw)
  To: tomas.winkler, joe, mm-commits


The patch titled
     Subject: checkpatch: don't complain about BIT macro in uapi
has been added to the -mm tree.  Its filename is
     checkpatch-dont-complain-about-bit-macro-in-uapi.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/checkpatch-dont-complain-about-bit-macro-in-uapi.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/checkpatch-dont-complain-about-bit-macro-in-uapi.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Tomas Winkler <tomas.winkler@intel.com>
Subject: 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>
---

 scripts/checkpatch.pl |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff -puN scripts/checkpatch.pl~checkpatch-dont-complain-about-bit-macro-in-uapi scripts/checkpatch.pl
--- a/scripts/checkpatch.pl~checkpatch-dont-complain-about-bit-macro-in-uapi
+++ a/scripts/checkpatch.pl
@@ -5733,8 +5733,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",
_

Patches currently in -mm which might be from tomas.winkler@intel.com are

checkpatch-dont-complain-about-bit-macro-in-uapi.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-07-19 23:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19 23:02 + checkpatch-dont-complain-about-bit-macro-in-uapi.patch added to -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).