[PATCH] checkpatch: Fix missing error reporting using --mailback
From: Andreas Kemnade
Date: Tue Nov 24 2026 - 01:50:35 EST
b4 uses --mailback, E.g. missing Sob tags get unnoticed in b4 prep --check.
See https://lore.kernel.org/all/20261123222615.7ef78105@xxxxxxxxxxxx/
Do check for that flag later, after the checks for Sob, to have it
reported and avoid churn.
Signed-off-by: Andreas Kemnade <andreas@xxxxxxxxxxxx>
---
scripts/checkpatch.pl | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index b8b64f7201915..5ea03013a6c4d 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -7867,12 +7867,6 @@ sub process {
exit(0);
}
- # In mailback mode only produce a report in the negative, for
- # things that appear to be patches.
- if ($mailback && ($clean == 1 || !$is_patch)) {
- exit(0);
- }
-
# This is not a patch, and we are in 'no-patch' mode so
# just keep quiet.
if (!$chk_patch && !$is_patch) {
@@ -7923,6 +7917,12 @@ sub process {
}
}
+ # In mailback mode only produce a report in the negative, for
+ # things that appear to be patches.
+ if ($mailback && ($clean == 1 || !$is_patch)) {
+ exit(0);
+ }
+
print report_dump();
if ($summary && !($clean == 1 && $quiet == 1)) {
print "$filename " if ($summary_file);
--
2.47.3