pr_cont(...) and printk(KERN_CONT ...) uses should be discouraged as their output can be interleaved by multiple logging processes.
Showing the changes to scripts/checkpatch.pl (1 of 1 file). Show all
Unified · Split
| @@ -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 | 5296 | # check for mask then right shift without a parentheses |
| 5291 | 5297 | if ($^V && $^V ge 5.10.0 && |
| 5292 | 5298 | $line =~ /$LvalOrFunc\s*\&\s*($LvalOrFunc)\s*>>/ && |