aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Perches <[email protected]>2013-11-12 15:10:11 -0800
committerLinus Torvalds <[email protected]>2013-11-13 12:09:25 +0900
commitc1fd7bb99637e69994d26df5f6e33192319d3866 (patch)
tree875cadcd10bc9375fefe44ebe665e4666cc4bb53
parente970b8846ae4763e64be3c93dc06b4eaebf9ad63 (diff)
checkpatch: make the memory barrier test noisier
Peter Zijlstra prefers that comments be required near uses of memory barriers. Change the message level for memory barrier uses from a --strict test only to a normal WARN so it's always emitted. This might produce false positives around insertions of memory barriers when a comment is outside the patch context block. And checkpatch is still stupid, it only looks for existence of any comment, not at the comment content. Signed-off-by: Joe Perches <[email protected]> Suggested-by: Peter Zijlstra <[email protected]> Acked-by: Peter Zijlstra <[email protected]> Acked-by: Paul E. McKenney <[email protected]> Cc: Oliver Neukum <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rwxr-xr-xscripts/checkpatch.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 23d55bfcb5af..2e40f64ed77f 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -3850,8 +3850,8 @@ sub process {
# check for memory barriers without a comment.
if ($line =~ /\b(mb|rmb|wmb|read_barrier_depends|smp_mb|smp_rmb|smp_wmb|smp_read_barrier_depends)\(/) {
if (!ctx_has_comment($first_line, $linenr)) {
- CHK("MEMORY_BARRIER",
- "memory barrier without comment\n" . $herecurr);
+ WARN("MEMORY_BARRIER",
+ "memory barrier without comment\n" . $herecurr);
}
}
# check of hardware specific defines