[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <a8784f291ccb5067361992bf5d41ff6cfb0ce5cb.1469830917.git.allenbh@gmail.com>
Date: Fri, 29 Jul 2016 18:27:31 -0400
From: Allen Hubbe <allenbh@...il.com>
To: linux-kernel@...r.kernel.org
Cc: Joe Perches <joe@...ches.com>, Andy Whitcroft <apw@...onical.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Allen Hubbe <allenbh@...il.com>
Subject: [PATCH] checkpatch: if no filenames then read stdin
If no filenames are given, then read the patch from stdin.
Signed-off-by: Allen Hubbe <allenbh@...il.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
Powered by blists - more mailing lists