From: Andy Whitcroft <apw@canonical.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, Andy Whitcroft <apw@canonical.com>
Subject: [PATCH 1/8] checkpatch: make in_atomic ok in the core
Date: Fri, 30 Jan 2009 15:05:13 +0000 [thread overview]
Message-ID: <1233327920-16691-2-git-send-email-apw@canonical.com> (raw)
In-Reply-To: <1233327920-16691-1-git-send-email-apw@canonical.com>
We say that in_atomic() is ok in the core kernel, but then always
report it regardless of where in the kernel it is. Keep quiet if
it is used in kernel/*.
Signed-off-by: Andy Whitcroft <apw@canonical.com>
---
scripts/checkpatch.pl | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 45eb0ae..c71a0fa 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -2560,7 +2560,7 @@ sub process {
if ($line =~ /\bin_atomic\s*\(/) {
if ($realfile =~ m@^drivers/@) {
ERROR("do not use in_atomic in drivers\n" . $herecurr);
- } else {
+ } elsif ($realfile !~ m@^kernel/@) {
WARN("use of in_atomic() is incorrect outside core kernel code\n" . $herecurr);
}
}
--
1.6.1.2.419.g0d87e
next prev parent reply other threads:[~2009-01-30 15:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-30 15:05 [PATCH 0/8] update checkpatch to v0.28 Andy Whitcroft
2009-01-30 15:05 ` Andy Whitcroft [this message]
2009-01-30 15:05 ` [PATCH 2/8] checkpatch: do not warn about -p0 patches when checking files Andy Whitcroft
2009-01-30 15:05 ` [PATCH 3/8] checkpatch: correctly handle type spacing in the face of modifiers Andy Whitcroft
2009-01-30 15:05 ` [PATCH 4/8] checkpatch: pointer type star may have modifiers following Andy Whitcroft
2009-01-30 15:05 ` [PATCH 5/8] checkpatch: a modifier is not an identifier at the end of a type Andy Whitcroft
2009-01-30 15:05 ` [PATCH 6/8] checkpatch: extend attribute testing to all modifiers Andy Whitcroft
2009-01-30 15:05 ` [PATCH 7/8] checkpatch: add __ref as a sparse modifier Andy Whitcroft
2009-01-30 15:05 ` [PATCH 8/8] checkpatch: version 0.28 Andy Whitcroft
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=1233327920-16691-2-git-send-email-apw@canonical.com \
--to=apw@canonical.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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®