From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754219AbcG2W2j (ORCPT ); Fri, 29 Jul 2016 18:28:39 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:33388 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752545AbcG2W2d (ORCPT ); Fri, 29 Jul 2016 18:28:33 -0400 From: Allen Hubbe To: linux-kernel@vger.kernel.org Cc: Joe Perches , Andy Whitcroft , Andrew Morton , Allen Hubbe Subject: [PATCH] checkpatch: if no filenames then read stdin Date: Fri, 29 Jul 2016 18:27:31 -0400 Message-Id: X-Mailer: git-send-email 2.9.1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org If no filenames are given, then read the patch from stdin. Signed-off-by: Allen Hubbe --- 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