aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-11-27 09:37:35 -0800
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>2017-12-05 11:57:55 -0800
commit91db2592e463157d8f4755f56230fb04d0308c4e (patch)
treeafd4f02261af68270aa884f1e38fa0e6b93ed707 /scripts
parentnetlink: Remove smp_read_barrier_depends() from comment (diff)
downloadlinux-dev-91db2592e463157d8f4755f56230fb04d0308c4e.tar.xz
linux-dev-91db2592e463157d8f4755f56230fb04d0308c4e.zip
checkpatch: Add warnings for {smp_,}read_barrier_depends()
Now that both smp_read_barrier_depends() and read_barrier_depends() are being de-emphasized, warn if any are added. Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: Andy Whitcroft <apw@canonical.com> Cc: Joe Perches <joe@perches.com> [ paulmck: Skipped checking files and handled whitespace per Joe Perches. ]
Diffstat (limited to '')
-rwxr-xr-xscripts/checkpatch.pl6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 95cda3ecc66b..9a384bfe2bd5 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -5586,6 +5586,12 @@ sub process {
}
}
+# check for smp_read_barrier_depends and read_barrier_depends
+ if (!$file && $line =~ /\b(smp_|)read_barrier_depends\s*\(/) {
+ WARN("READ_BARRIER_DEPENDS",
+ "$1read_barrier_depends should only be used in READ_ONCE or DEC Alpha code\n" . $herecurr);
+ }
+
# check of hardware specific defines
if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) {
CHK("ARCH_DEFINES",