public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Whitcroft <apw@canonical.com>
To: Mike Rapoport <mike@compulab.co.il>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: checkpatch --file warns about p0 patch
Date: Mon, 23 Feb 2009 14:43:12 +0000	[thread overview]
Message-ID: <20090223144312.GC22617@shadowen.org> (raw)
In-Reply-To: <49A2B0A5.8050905@compulab.co.il>

On Mon, Feb 23, 2009 at 04:20:21PM +0200, Mike Rapoport wrote:
> When running checkpatch.pl with --file option it warns about -p0 patch:
> 
> ./scripts/checkpatch.pl --file ./drivers/rtc/rtc-v3020.c
> WARNING: patch prefix '.' exists, appears to be a -p0 patch
> 
> total: 0 errors, 1 warnings, 263 lines checked
> 
> ./drivers/rtc/rtc-v3020.c has style problems, please review.  If any of these errors
> are false positives report them to the maintainer, see
> CHECKPATCH in MAINTAINERS.
> 
> I hope this is the fix that'll work:
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 45eb0ae..1869388 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -1240,7 +1240,7 @@ 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");
>  			}
> 
> 
> 
> -- 

Hmm, that should already be fixed in the version Andrew Morton has.
Could you test with v0.28 and confirm its already fixed?


  http://www.kernel.org/pub/linux/kernel/people/apw/checkpatch/checkpatch.pl-v0.28

-apw

  reply	other threads:[~2009-02-23 14:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-23 14:20 checkpatch --file warns about p0 patch Mike Rapoport
2009-02-23 14:43 ` Andy Whitcroft [this message]
2009-02-23 14:56   ` Mike Rapoport
2009-02-23 23:04   ` Andrew Morton
2009-02-28 23:55     ` Andy Whitcroft

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090223144312.GC22617@shadowen.org \
    --to=apw@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mike@compulab.co.il \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox