From: Allen Hubbe <allenbh@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: Joe Perches <joe@perches.com>, Andy Whitcroft <apw@canonical.com>,
Andrew Morton <akpm@linux-foundation.org>,
Allen Hubbe <allenbh@gmail.com>
Subject: [PATCH] checkpatch: if no filenames then read stdin
Date: Fri, 29 Jul 2016 18:27:31 -0400 [thread overview]
Message-ID: <a8784f291ccb5067361992bf5d41ff6cfb0ce5cb.1469830917.git.allenbh@gmail.com> (raw)
If no filenames are given, then read the patch from stdin.
Signed-off-by: Allen Hubbe <allenbh@gmail.com>
---
scripts/checkpatch.pl | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 90e1edc8dd42..b0659f1e9b09 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -178,9 +178,9 @@ if ($^V && $^V lt $minimum_perl_version) {
}
}
+#if no filenames are given, push '-' to read patch from stdin
if ($#ARGV < 0) {
- print "$P: no input files\n";
- exit(1);
+ push(@ARGV, '-');
}
sub hash_save_array_words {
--
2.9.1
next reply other threads:[~2016-07-29 22:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-29 22:27 Allen Hubbe [this message]
2016-07-29 22:27 ` [PATCH] checkpatch: fix perl warning about unescaped brace Allen Hubbe
2016-07-29 23:06 ` Joe Perches
2016-07-29 23:57 ` Allen Hubbe
2016-07-30 1:41 ` Allen Hubbe
2016-07-30 1:51 ` Joe Perches
2016-07-29 23:35 ` [PATCH] checkpatch: if no filenames then read stdin Joe Perches
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=a8784f291ccb5067361992bf5d41ff6cfb0ce5cb.1469830917.git.allenbh@gmail.com \
--to=allenbh@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=apw@canonical.com \
--cc=joe@perches.com \
--cc=linux-kernel@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;
as well as URLs for NNTP newsgroup(s).