mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tiezhu Yang <yangtiezhu@loongson.cn>
To: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>,
	Dwaipayan Ray <dwaipayanray1@gmail.com>,
	Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] checkpatch: add help info if no filenames are given
Date: Tue, 18 May 2021 10:38:03 +0800	[thread overview]
Message-ID: <f6291875-ee94-eb2c-785c-080b383b6e03@loongson.cn> (raw)
In-Reply-To: <b09f7f17f07cf960c26ddb522558e3ab5187ba83.camel@perches.com>

On 05/18/2021 10:22 AM, Joe Perches wrote:
> On Tue, 2021-05-18 at 09:25 +0800, Tiezhu Yang 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. This means the script waits for input indefinitely, which
>> confuses new checkpatch users at first.
>>
>> Add some help info on this behaviour of checkpatch to lower the confusion.
>>
>> Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
>> ---
>>   scripts/checkpatch.pl | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
>> index 23697a6..825eb00 100755
>> --- a/scripts/checkpatch.pl
>> +++ b/scripts/checkpatch.pl
>> @@ -80,6 +80,8 @@ sub help {
>>   Usage: $P [OPTION]... [FILE]...
>>   Version: $V
>>   
>>
>> +When FILE is -, or absent, checkpatch reads from standard input.
>> +
>>   Options:
>>     -q, --quiet                quiet
>>     -v, --verbose              verbose mode
>> @@ -138,8 +140,6 @@ Options:
>>     --kconfig-prefix=WORD      use WORD as a prefix for Kconfig symbols (default
>>                                ${CONFIG_})
>>     -h, --help, --version      display this help and exit
>> -
>> -When FILE is - read standard input.
> This line is redundant/unnecessary.

This commit adds
"When FILE is -, or absent, checkpatch reads from standard input."
and delete
"When FILE is - read standard input."

>
>>   EOM
>>   
>>
>>   	exit($exitcode);


      reply	other threads:[~2021-05-18  2:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-18  1:25 Tiezhu Yang
2021-05-18  2:22 ` Joe Perches
2021-05-18  2:38   ` Tiezhu Yang [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=f6291875-ee94-eb2c-785c-080b383b6e03@loongson.cn \
    --to=yangtiezhu@loongson.cn \
    --cc=apw@canonical.com \
    --cc=dwaipayanray1@gmail.com \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /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

all inboxes | Powered by JetHome®