From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Jonathan Corbet <corbet@lwn.net>, Joe Perches <joe@perches.com>,
Lukas Bulwahn <lukas.bulwahn@gmail.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH] Documentation: checkpatch: add description if no filenames are given
Date: Mon, 17 May 2021 11:51:05 +0530 [thread overview]
Message-ID: <CABJPP5DRw3pNs0da4HdCLXVHSa6sE88xJOO6C3c_oBESLoWq3A@mail.gmail.com> (raw)
In-Reply-To: <1621224036-32092-1-git-send-email-yangtiezhu@loongson.cn>
Hey,
On Mon, May 17, 2021 at 9:30 AM Tiezhu Yang <yangtiezhu@loongson.cn> wrote:
>
> After commit 45107ff6d526 ("checkpatch: if no filenames then read stdin"),
> if no filenames are given, it will read patch from stdin rather than exit
> directly, it is a bit confusing whether the script hangs, I do not quite
> know what to do next util I understand the code logic.
util -> until
>
> At the beginning, I want to print some info if no filenames are given [1],
> but as Joe Perches said, this is unnecessary. It's like trying to make cat
> without command line arguments emit something.
>
> So as Lukas Bulwahn suggested, add description for somebody that actually
> reads the available kernel documentation on checkpatch.
>
> [1] https://lore.kernel.org/patchwork/patch/1429026/
>
> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
> ---
> Documentation/dev-tools/checkpatch.rst | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/dev-tools/checkpatch.rst b/Documentation/dev-tools/checkpatch.rst
> index 51fed1b..181b95e 100644
> --- a/Documentation/dev-tools/checkpatch.rst
> +++ b/Documentation/dev-tools/checkpatch.rst
> @@ -210,6 +210,8 @@ Available options:
>
> Display the help text.
>
> +When FILE is -, or no filenames are given, read standard input.
> +
The addition is reasonable but the position of the text is a bit weird.
Let's have it after the Usage:: text:
-----------
diff --git a/Documentation/dev-tools/checkpatch.rst
b/Documentation/dev-tools/checkpatch.rst
index d4bb55723a86..7bf1e48207ce 100644
--- a/Documentation/dev-tools/checkpatch.rst
+++ b/Documentation/dev-tools/checkpatch.rst
@@ -22,6 +22,8 @@ Usage::
./scripts/checkpatch.pl [OPTION]... [FILE]...
+When FILE is -, or absent, checkpatch reads from standard input.
+
Available options:
- -q, --quiet
@@ -210,7 +212,6 @@ Available options:
Display the help text.
-When FILE is -, or no filenames are given, read standard input.
Message Levels
==============
-------------
Thanks,
Dwaipayan.
next prev parent reply other threads:[~2021-05-17 6:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 4:00 [PATCH] Documentation: checkpatch: add description if no filenames are given Tiezhu Yang
2021-05-17 6:21 ` Dwaipayan Ray [this message]
2021-05-17 7:12 ` Lukas Bulwahn
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=CABJPP5DRw3pNs0da4HdCLXVHSa6sE88xJOO6C3c_oBESLoWq3A@mail.gmail.com \
--to=dwaipayanray1@gmail.com \
--cc=corbet@lwn.net \
--cc=joe@perches.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas.bulwahn@gmail.com \
--cc=yangtiezhu@loongson.cn \
/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;
as well as URLs for NNTP newsgroup(s).