Re: [PATCH] checkpatch: check for incorrect permissions
From: Rabin VINCENT
Date: Fri Aug 13 2010 - 00:55:51 EST
On Thu, Aug 12, 2010 at 23:02:22 +0200, Andrew Morton wrote:
> On Thu, 12 Aug 2010 10:45:45 +0530
> Rabin Vincent <rabin.vincent@xxxxxxxxxxxxxx> wrote:
> > # extract the filename as it passes
> > - if ($line=~/^\+\+\+\s+(\S+)/) {
> > + if ($line=~/^\+\+\+\s+(\S+)/ || $line=~/^diff\s.*?(\S+)$/) {
>
> Breakage. This causes the false warning:
>
> WARNING: patch prefix 'drivers' exists, appears to be a -p0 patch
I've fixed this by matching for the filename in the diff line only when
it's "diff --git". Also prevented a double-print of the "do not modify
file in include/asm" error.