From: Mark Rutland <mark.rutland@arm.com>
To: linux-kernel@vger.kernel.org, mingo@redhat.com
Cc: acme@redhat.com, apw@canonical.com, joe@perches.com,
mark.rutland@arm.com, paulmck@linux.vnet.ibm.com,
peterz@infradead.org
Subject: [PATCH 4/4] checkpatch: remove ACCESS_ONCE() warning
Date: Mon, 27 Nov 2017 10:38:24 +0000 [thread overview]
Message-ID: <20171127103824.36526-5-mark.rutland@arm.com> (raw)
In-Reply-To: <20171127103824.36526-1-mark.rutland@arm.com>
Now that ACCESS_ONCE() has been excised from the kernel, any uses will
result in a build error, and we no longer need to whine about it in
checkpatch.
This patch removes the newly redundant warning.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Joe Perches <joe@perches.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
---
scripts/checkpatch.pl | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 95cda3ecc66b..95c08493b78b 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -6233,28 +6233,6 @@ sub process {
}
}
-# whine about ACCESS_ONCE
- if ($^V && $^V ge 5.10.0 &&
- $line =~ /\bACCESS_ONCE\s*$balanced_parens\s*(=(?!=))?\s*($FuncArg)?/) {
- my $par = $1;
- my $eq = $2;
- my $fun = $3;
- $par =~ s/^\(\s*(.*)\s*\)$/$1/;
- if (defined($eq)) {
- if (WARN("PREFER_WRITE_ONCE",
- "Prefer WRITE_ONCE(<FOO>, <BAR>) over ACCESS_ONCE(<FOO>) = <BAR>\n" . $herecurr) &&
- $fix) {
- $fixed[$fixlinenr] =~ s/\bACCESS_ONCE\s*\(\s*\Q$par\E\s*\)\s*$eq\s*\Q$fun\E/WRITE_ONCE($par, $fun)/;
- }
- } else {
- if (WARN("PREFER_READ_ONCE",
- "Prefer READ_ONCE(<FOO>) over ACCESS_ONCE(<FOO>)\n" . $herecurr) &&
- $fix) {
- $fixed[$fixlinenr] =~ s/\bACCESS_ONCE\s*\(\s*\Q$par\E\s*\)/READ_ONCE($par)/;
- }
- }
- }
-
# check for mutex_trylock_recursive usage
if ($line =~ /mutex_trylock_recursive/) {
ERROR("LOCKING",
--
2.11.0
next prev parent reply other threads:[~2017-11-27 10:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-27 10:38 [PATCH 0/4] Final ACCESS_ONCE() cleanups for v4.15 Mark Rutland
2017-11-27 10:38 ` [PATCH 1/4] perf mmap: Convert ACCESS_ONCE() to READ_ONCE() Mark Rutland
2017-12-12 15:06 ` [tip:locking/urgent] tools/perf: " tip-bot for Mark Rutland
2017-11-27 10:38 ` [PATCH 2/4] tools: include: remove ACCESS_ONCE() Mark Rutland
2017-12-12 15:07 ` [tip:locking/urgent] tools/include: Remove ACCESS_ONCE() tip-bot for Mark Rutland
2017-11-27 10:38 ` [PATCH 3/4] compiler.h: remove ACCESS_ONCE() Mark Rutland
2017-12-12 15:07 ` [tip:locking/urgent] compiler.h: Remove ACCESS_ONCE() tip-bot for Mark Rutland
2017-11-27 10:38 ` Mark Rutland [this message]
2017-11-27 10:50 ` [PATCH 4/4] checkpatch: remove ACCESS_ONCE() warning Joe Perches
2017-11-27 10:58 ` Mark Rutland
2017-12-12 15:07 ` [tip:locking/urgent] checkpatch: Remove " tip-bot for Mark Rutland
2017-11-27 21:11 ` [PATCH 0/4] Final ACCESS_ONCE() cleanups for v4.15 Paul E. McKenney
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=20171127103824.36526-5-mark.rutland@arm.com \
--to=mark.rutland@arm.com \
--cc=acme@redhat.com \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.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®