Now that both smp_read_barrier_depends() and read_barrier_depends() are being de-emphasized, warn if any are added.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -5586,6 +5586,12 @@ sub process { · 5585 unmodified lines | ||
| 5586 | 5586 | } |
| 5587 | 5587 | } |
| 5588 | 5588 | |
| 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 | + | |
| 5589 | 5595 | # check of hardware specific defines |
| 5590 | 5596 | if ($line =~ m@^.\s*\#\s*if.*\b(__i386__|__powerpc64__|__sun__|__s390x__)\b@ && $realfile !~ m@include/asm-@) { |
| 5591 | 5597 | CHK("ARCH_DEFINES", |