From: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
To: Jonathan Corbet <corbet@lwn.net>,
Linux Doc Mailing List <linux-doc@vger.kernel.org>
Cc: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>,
dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
workflows@vger.kernel.org,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Shuah Khan <skhan@linuxfoundation.org>
Subject: [PATCH 7/9] docs: kdoc: move the return values to the helper message
Date: Mon, 19 Jan 2026 13:05:02 +0100 [thread overview]
Message-ID: <3bcfa48016770929fcd073376515e3ff0b777ea8.1768823489.git.mchehab+huawei@kernel.org> (raw)
In-Reply-To: <cover.1768823489.git.mchehab+huawei@kernel.org>
It makes sense to describe what kernel-doc is expected to return
on its help message. Move such messages to argparse epilog.
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
---
tools/docs/kernel-doc | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)
diff --git a/tools/docs/kernel-doc b/tools/docs/kernel-doc
index a19a92566780..902397804e80 100755
--- a/tools/docs/kernel-doc
+++ b/tools/docs/kernel-doc
@@ -166,6 +166,20 @@ This option is kept just for backward-compatibility, but it does nothing,
neither here nor at the original Perl script.
"""
+EPILOG = """
+The return value is:
+
+- 0: success or Python version is not compatible with
+kernel-doc. If -Werror is not used, it will also
+return 0 if there are issues at kernel-doc markups;
+
+- 1: an abnormal condition happened;
+
+- 2: argparse issued an error;
+
+- 3: When -Werror is used, it means that one or more unfiltered parse
+ warnings happened.
+"""
class MsgFormatter(logging.Formatter):
"""Helper class to format warnings in a similar way to kernel-doc.pl."""
@@ -178,21 +192,10 @@ def main():
"""
Main program.
- By default, the return value is:
-
- - 0: success or Python version is not compatible with
- kernel-doc. If -Werror is not used, it will also
- return 0 if there are issues at kernel-doc markups;
-
- - 1: an abnormal condition happened;
-
- - 2: argparse issued an error;
-
- - 3: -Werror is used, and one or more unfiltered parse warnings happened.
"""
parser = argparse.ArgumentParser(formatter_class=argparse.RawTextHelpFormatter,
- description=DESC)
+ description=DESC, epilog=EPILOG)
#
# Normal arguments
--
2.52.0
next prev parent reply other threads:[~2026-01-19 12:05 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-19 12:04 [PATCH 0/9] docs: Fix kernel-doc -Werror and moves it to tools/docs Mauro Carvalho Chehab
2026-01-19 12:04 ` [PATCH 1/9] docs: kdoc: fix logic to handle unissued warnings Mauro Carvalho Chehab
2026-01-19 12:04 ` [PATCH 2/9] docs: kdoc: avoid error_count overflows Mauro Carvalho Chehab
2026-01-19 12:04 ` [PATCH 3/9] docs: kdoc: ensure that comments are using our coding style Mauro Carvalho Chehab
2026-01-19 12:04 ` [PATCH 4/9] docs: kdoc: some fixes to kernel-doc comments Mauro Carvalho Chehab
2026-01-19 12:05 ` [PATCH 5/9] docs: kdoc: remove support for an external kernel-doc from sphinx Mauro Carvalho Chehab
2026-01-19 12:05 ` [PATCH 6/9] docs: kdoc: move kernel-doc to tools/docs Mauro Carvalho Chehab
2026-01-19 12:05 ` Mauro Carvalho Chehab [this message]
2026-01-19 12:05 ` [PATCH 8/9] docs: kdoc: improve description of MsgFormatter Mauro Carvalho Chehab
2026-01-19 12:05 ` [PATCH 9/9] docs: conf.py: get rid of the now unused kerneldoc_bin env var Mauro Carvalho Chehab
2026-01-20 22:56 ` [PATCH 0/9] docs: Fix kernel-doc -Werror and moves it to tools/docs Jonathan Corbet
2026-01-20 23:00 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3bcfa48016770929fcd073376515e3ff0b777ea8.1768823489.git.mchehab+huawei@kernel.org \
--to=mchehab+huawei@kernel.org \
--cc=corbet@lwn.net \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=workflows@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox