linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] checkpatch: if no filenames then read stdin
@ 2016-07-29 22:27 Allen Hubbe
  2016-07-29 22:27 ` [PATCH] checkpatch: fix perl warning about unescaped brace Allen Hubbe
  2016-07-29 23:35 ` [PATCH] checkpatch: if no filenames then read stdin Joe Perches
  0 siblings, 2 replies; 7+ messages in thread
From: Allen Hubbe @ 2016-07-29 22:27 UTC (permalink / raw)
  To: linux-kernel; +Cc: Joe Perches, Andy Whitcroft, Andrew Morton, Allen Hubbe

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-30  1:51 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-29 22:27 [PATCH] checkpatch: if no filenames then read stdin Allen Hubbe
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

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).