mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
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. ]
This commit is contained in:
parent
dfe1b44278
commit
91db2592e4
1 changed files with 6 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue