* [PATCH] checkpatch: add help info if no filenames are given
@ 2021-05-18 1:25 Tiezhu Yang
2021-05-18 2:22 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Tiezhu Yang @ 2021-05-18 1:25 UTC (permalink / raw)
To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn; +Cc: linux-kernel
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.
EOM
exit($exitcode);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: add help info if no filenames are given
2021-05-18 1:25 [PATCH] checkpatch: add help info if no filenames are given Tiezhu Yang
@ 2021-05-18 2:22 ` Joe Perches
2021-05-18 2:38 ` Tiezhu Yang
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2021-05-18 2:22 UTC (permalink / raw)
To: Tiezhu Yang, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn; +Cc: linux-kernel
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.
> EOM
>
>
> exit($exitcode);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] checkpatch: add help info if no filenames are given
2021-05-18 2:22 ` Joe Perches
@ 2021-05-18 2:38 ` Tiezhu Yang
0 siblings, 0 replies; 3+ messages in thread
From: Tiezhu Yang @ 2021-05-18 2:38 UTC (permalink / raw)
To: Joe Perches, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn; +Cc: linux-kernel
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);
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-05-18 2:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-18 1:25 [PATCH] checkpatch: add help info if no filenames are given Tiezhu Yang
2021-05-18 2:22 ` Joe Perches
2021-05-18 2:38 ` Tiezhu Yang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.