From: Andy Whitcroft Date: Fri, 27 Feb 2009 22:03:06 +0000 (-0800) Subject: checkpatch: do not warn about -p0 patches when checking files X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e2f7aa4b8bc811ebf8afbdf423caf90a5a03cb08;p=linux-beck.git 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: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index c71a0fae84df..5ffc940399be 100755 --- a/scripts/checkpatch.pl +++ b/scripts/checkpatch.pl @@ -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"); }