History

checkpatch: warn on logging continuations

pr_cont(...) and printk(KERN_CONT ...) uses should be discouraged as their output can be interleaved by multiple logging processes.

Joe Perches committed 9 years ago

Commit 45c55e91 parent 77cb8541 file · +6 −0Browse files

Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all

Unified · Split

scripts/checkpatch.pl+6−0
@@ -5287,6 +5287,12 @@ sub process { · 5286 unmodified lines
5287 }5287 }
5288 }5288 }
5289 5289
5290# check for logging continuations
5291 if ($line =~ /\bprintk\s*\(\s*KERN_CONT\b|\bpr_cont\s*\(/) {
5292 WARN("LOGGING_CONTINUATION",
5293 "Avoid logging continuation uses where feasible\n" . $herecurr);
5294 }
5295
5290# check for mask then right shift without a parentheses5296# check for mask then right shift without a parentheses
5291 if ($^V && $^V ge 5.10.0 &&5297 if ($^V && $^V ge 5.10.0 &&
5292 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&5298 $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ &&