Skip to content

Commit

Permalink
checkpatch: if no filenames then read stdin
Browse files Browse the repository at this point in the history
If no filenames are given, then read the patch from stdin.

Link: http://lkml.kernel.org/r/a8784f291ccb5067361992bf5d41ff6cfb0ce5cb.1469830917.git.allenbh@gmail.com
Signed-off-by: Allen Hubbe <[email protected]>
Acked-by: Joe Perches <[email protected]>
Cc: Andy Whitcroft <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
allenbh authored and torvalds committed Aug 2, 2016
1 parent ed43c4e commit 45107ff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -228,9 +228,9 @@ sub list_types {
}
}

#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 {
Expand Down

0 comments on commit 45107ff

Please sign in to comment.