|
@@ -5143,6 +5143,16 @@ sub process {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ my $underscore_smp_barriers = qr{__smp_(?:$barrier_stems)}x;
|
|
|
+
|
|
|
+ if ($realfile !~ m@^include/asm-generic/@ &&
|
|
|
+ $realfile !~ m@/barrier\.h$@ &&
|
|
|
+ $line =~ m/\b(?:$underscore_smp_barriers)\s*\(/ &&
|
|
|
+ $line !~ m/^.\s*\#\s*define\s+(?:$underscore_smp_barriers)\s*\(/) {
|
|
|
+ WARN("MEMORY_BARRIER",
|
|
|
+ "__smp memory barriers shouldn't be used outside barrier.h and asm-generic\n" . $herecurr);
|
|
|
+ }
|
|
|
+
|
|
|
# check for waitqueue_active without a comment.
|
|
|
if ($line =~ /\bwaitqueue_active\s*\(/) {
|
|
|
if (!ctx_has_comment($first_line, $linenr)) {
|