Skip to content

Commit 91db259

Browse files
committed
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 <[email protected]> Cc: Andy Whitcroft <[email protected]> Cc: Joe Perches <[email protected]> [ paulmck: Skipped checking files and handled whitespace per Joe Perches. ]
1 parent dfe1b44 commit 91db259

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

scripts/checkpatch.pl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5586,6 +5586,12 @@ sub process {
55865586
}
55875587
}
55885588

5589+
# check for smp_read_barrier_depends and read_barrier_depends
5590+
if (!$file && $line =~ /\b(smp_|)read_barrier_depends\s*\(/) {
5591+
WARN("READ_BARRIER_DEPENDS",
5592+
"$1read_barrier_depends should only be used in READ_ONCE or DEC Alpha code\n" . $herecurr);
5593+
}
5594+
55895595
# check of hardware specific defines
55905596
if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) {
55915597
CHK("ARCH_DEFINES",

0 commit comments

Comments
 (0)