From: Octavian Purdila <octavian.purdila@intel.com>
To: apw@canonical.com, joe@perches.com
Cc: linux-kernel@vger.kernel.org,
Octavian Purdila <octavian.purdila@intel.com>
Subject: [PATCH] checkpatch: avoid showing BIT_ULL warnings for tools/ files
Date: Mon, 21 Sep 2015 19:30:46 +0300 [thread overview]
Message-ID: <1442853046-29397-2-git-send-email-octavian.purdila@intel.com> (raw)
In-Reply-To: <1442853046-29397-1-git-send-email-octavian.purdila@intel.com>
Directly using shift operations in userspace compiled code should not
trigger warnings as BIT_ULL macros are not available outside the
kernel.
Signed-off-by: Octavian Purdila <octavian.purdila@intel.com>
---
scripts/checkpatch.pl | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 407eb6c..93557bf 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5527,7 +5527,8 @@ sub process {
if ($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",
+ if ($realfile !~ m@\btools/@ &&
+ CHK("BIT_MACRO",
"Prefer using the BIT$ull macro\n" . $herecurr) &&
$fix) {
$fixed[$fixlinenr] =~ s/\(?\s*1\s*[ulUL]*\s*<<\s*(\d+|$Ident)\s*\)?/BIT${ull}($1)/;
--
1.9.1
prev parent reply other threads:[~2015-09-21 16:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-21 16:30 [PATCH] checkpatch: avoid showing uint*_t " Octavian Purdila
2015-09-21 16:30 ` Octavian Purdila [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1442853046-29397-2-git-send-email-octavian.purdila@intel.com \
--to=octavian.purdila@intel.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®