From: "Yang Shi" <yang.s@alibaba-inc.com>
To: apw@canonical.com, joe@perches.com
Cc: <akpm@linux-foundation.org>, "Yang Shi" <yang.s@alibaba-inc.com>,
<linux-kernel@vger.kernel.org>
Subject: [RFC PATCH] scripts: checkpatch.pl: remove obsolete in_atomic rule
Date: Sat, 04 Nov 2017 03:08:06 +0800 [thread overview]
Message-ID: <1509736086-408-1-git-send-email-yang.s@alibaba-inc.com> (raw)
checkpatch.pl still reports the below in_atomic warning:
WARNING: use of in_atomic() is incorrect outside core kernel code
+ if (in_atomic())
But, in_atomic() has been used outside kernel dir for a long time, and
even drivers. So, remove the obsolete rule even though they can be
ignored.
Signed-off-by: Yang Shi <yang.s@alibaba-inc.com>
CC: Andrew Morton <akpm@linux-foundation.org>
---
Not sure if removing the obsolete rule is preferred by checkpatch.pl, anyway
it sounds not make sense to keep invalid rule.
scripts/checkpatch.pl | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 8b80bac..e8cf94f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6231,17 +6231,6 @@ sub process {
"Using $1 should generally have parentheses around the comparison\n" . $herecurr);
}
-# whine mightly about in_atomic
- if ($line =~ /\bin_atomic\s*\(/) {
- if ($realfile =~ m@^drivers/@) {
- ERROR("IN_ATOMIC",
- "do not use in_atomic in drivers\n" . $herecurr);
- } elsif ($realfile !~ m@^kernel/@) {
- WARN("IN_ATOMIC",
- "use of in_atomic() is incorrect outside core kernel code\n" . $herecurr);
- }
- }
-
# whine about ACCESS_ONCE
if ($^V && $^V ge 5.10.0 &&
$line =~ /\bACCESS_ONCE\s*$balanced_parens\s*(=(?!=))?\s*($FuncArg)?/) {
--
1.8.3.1
next reply other threads:[~2017-11-03 19:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-03 19:08 Yang Shi [this message]
2017-11-03 19:41 ` Joe Perches
2017-11-03 22:41 ` Yang Shi
2017-11-06 13:52 ` Michal Hocko
2017-11-06 16:08 ` Yang Shi
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=1509736086-408-1-git-send-email-yang.s@alibaba-inc.com \
--to=yang.s@alibaba-inc.com \
--cc=akpm@linux-foundation.org \
--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®