summaryrefslogtreecommitdiff
path: root/scripts/lib/kdoc/kdoc_output.py
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2025-04-08 18:09:31 +0800
committerJonathan Corbet <corbet@lwn.net>2025-04-09 12:10:34 -0600
commit11afeab6d74d1be80420b47113c4893c88dcc04b (patch)
tree60191a596a164a53274637ccba436f65eade50d2 /scripts/lib/kdoc/kdoc_output.py
parente4b2bd908c3d8f071d4fac6e588fffc6110c1b1f (diff)
scripts/kernel-doc.py: Properly handle Werror and exit codes
The original kernel-doc script has a logic to return warnings as errors, and to report the number of warnings found, if in verbose mode. Implement it to be fully compatible with the original script. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Signed-off-by: Jonathan Corbet <corbet@lwn.net> Link: https://lore.kernel.org/r/de33b0cebd9fdf82d8b221bcfe41db7269286222.1744106242.git.mchehab+huawei@kernel.org
Diffstat (limited to 'scripts/lib/kdoc/kdoc_output.py')
-rwxr-xr-xscripts/lib/kdoc/kdoc_output.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/lib/kdoc/kdoc_output.py b/scripts/lib/kdoc/kdoc_output.py
index eb013075da84..e9b4d0093084 100755
--- a/scripts/lib/kdoc/kdoc_output.py
+++ b/scripts/lib/kdoc/kdoc_output.py
@@ -128,11 +128,9 @@ class OutputFormat:
warnings = args.get('warnings', [])
- for warning, log_msg in warnings:
- if warning:
- self.config.log.warning(log_msg)
- else:
- self.config.log.info(log_msg)
+ for log_msg in warnings:
+ self.config.log.warning(log_msg)
+ self.config.errors += 1
def check_doc(self, name, args):
"""Check if DOC should be output"""