From: Lukas Bulwahn <lukas.bulwahn@gmail.com>
To: Tiezhu Yang <yangtiezhu@loongson.cn>
Cc: Dwaipayan Ray <dwaipayanray1@gmail.com>,
Joe Perches <joe@perches.com>, Jonathan Corbet <corbet@lwn.net>,
"open list:DOCUMENTATION" <linux-doc@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2] Documentation: checkpatch: add description if no filenames are given
Date: Mon, 17 May 2021 11:09:44 +0200 [thread overview]
Message-ID: <CAKXUXMwtMBCB6ovrG90BB5EruTkFSk=O8X-kxeikqhDgt8hryQ@mail.gmail.com> (raw)
In-Reply-To: <1621239159-21139-1-git-send-email-yangtiezhu@loongson.cn>
On Mon, May 17, 2021 at 10:12 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 until I understood the code logic.
>
> It is unnecessary to print some info if no filenames are given, because it
> is like trying to make cat without command line arguments emit something,
> just add description for somebody that actually reads the available kernel
> documentation on checkpatch.
>
How about:
...
if no filenames are given, it will read patch from stdin rather than exit
directly. This means the script waits for input indefinitely, which
confuses new checkpatch users at first.
Add some basic documentation on this behaviour of checkpatch to lower
the confusion.
...
No need to mention that you were confused.
Other than that, it now looks good. Thanks for the patch, can we get a
quick v3 and then we are settled.
Lukas
> 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..3eb9ead 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
> --
> 2.1.0
>
prev parent reply other threads:[~2021-05-17 9:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 8:12 [PATCH v2] Documentation: checkpatch: add description if no filenames are given Tiezhu Yang
2021-05-17 9:09 ` Lukas Bulwahn [this message]
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='CAKXUXMwtMBCB6ovrG90BB5EruTkFSk=O8X-kxeikqhDgt8hryQ@mail.gmail.com' \
--to=lukas.bulwahn@gmail.com \
--cc=corbet@lwn.net \
--cc=dwaipayanray1@gmail.com \
--cc=joe@perches.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--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).