Commit e2f7aa4b authored by Andy Whitcroft's avatar Andy Whitcroft Committed by Linus Torvalds

checkpatch: do not warn about -p0 patches when checking files

We are triggering the -p0 check for our own diffs generated using --file
command line option.  Suppress this check for files.
Signed-off-by: default avatarAndy Whitcroft <apw@canonical.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent f4a87736
...@@ -1240,7 +1240,8 @@ sub process { ...@@ -1240,7 +1240,8 @@ sub process {
$realfile =~ s@^([^/]*)/@@; $realfile =~ s@^([^/]*)/@@;
$p1_prefix = $1; $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"); WARN("patch prefix '$p1_prefix' exists, appears to be a -p0 patch\n");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment