Skip to content

Commit

Permalink
checkpatch: do not warn about -p0 patches when checking files
Browse files Browse the repository at this point in the history
We are triggering the -p0 check for our own diffs generated using --file
command line option.  Suppress this check for files.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Andy Whitcroft authored and Linus Torvalds committed Feb 28, 2009
1 parent f4a8773 commit e2f7aa4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/checkpatch.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1240,7 +1240,8 @@ sub process {
$realfile =~ s@^([^/]*)/@@;

$p1_prefix = $1;
if ($tree && $p1_prefix ne '' && -e "$root/$p1_prefix") {
if (!$file && $tree && $p1_prefix ne '' &&
-e "$root/$p1_prefix") {
WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
}

Expand Down

0 comments on commit e2f7aa4

Please sign in to comment.