linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: checkpatch: question about "patch prefix 'b' exists" warning
       [not found] <CAK7LNAThr6z-bu3znMps0MaS0m-VYxUPv-DPkr-XzWeLJ5Vu4g@mail.gmail.com>
@ 2022-09-24 18:03 ` Masahiro Yamada
  2022-09-24 21:43   ` Joe Perches
  0 siblings, 1 reply; 3+ messages in thread
From: Masahiro Yamada @ 2022-09-24 18:03 UTC (permalink / raw)
  To: Andy Whitcroft, Joe Perches, Dwaipayan Ray, Lukas Bulwahn
  Cc: Linux Kernel Mailing List

(+CC: LKML)

On Sun, Sep 25, 2022 at 3:00 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Hi.
>
>
> When I used scripts/checkpatch.pl to check a patch file
> generated by 'git format-patch', I observed this warning,
>
>
>   WARNING: patch prefix 'b' exists, appears to be a -p0 patch
>
>
>
> I did not understand what was causing this warning until
> I saw the source code of ./scripts/checkpatch.pl
>
>
>
> It looks like the presence of the file 'b' triggers this warning.
>
>
>
> $ ./scripts/checkpatch.pl 0001-kbuild-re-run-modpost-when-it-is-updated.patch
> total: 0 errors, 0 warnings, 48 lines checked
>
> 0001-kbuild-re-run-modpost-when-it-is-updated.patch has no obvious
> style problems and is ready for submission.
>
>
> $ touch b
> $ ./scripts/checkpatch.pl 0001-kbuild-re-run-modpost-when-it-is-updated.patch
> WARNING: patch prefix 'b' exists, appears to be a -p0 patch
>
> total: 0 errors, 1 warnings, 48 lines checked
>
> NOTE: For some of the reported defects, checkpatch may be able to
>       mechanically convert to the typical style using --fix or --fix-inplace.
>
> 0001-kbuild-re-run-modpost-when-it-is-updated.patch has style
> problems, please review.
>
> NOTE: If any of the errors are false positives, please report
>       them to the maintainer, see CHECKPATCH in MAINTAINERS.
>
>
>
>
>
> Is this intentional behavior?
>
>
>
>
>
>
> --
> Best Regards
> Masahiro Yamada



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: checkpatch: question about "patch prefix 'b' exists" warning
  2022-09-24 18:03 ` checkpatch: question about "patch prefix 'b' exists" warning Masahiro Yamada
@ 2022-09-24 21:43   ` Joe Perches
  2022-09-25  0:54     ` Masahiro Yamada
  0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2022-09-24 21:43 UTC (permalink / raw)
  To: Masahiro Yamada, Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn
  Cc: Linux Kernel Mailing List

On Sun, 2022-09-25 at 03:03 +0900, Masahiro Yamada wrote:
> (+CC: LKML)
> On Sun, Sep 25, 2022 at 3:00 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > When I used scripts/checkpatch.pl to check a patch file
> > generated by 'git format-patch', I observed this warning,
> > 
> >   WARNING: patch prefix 'b' exists, appears to be a -p0 patch
[]
> > Is this intentional behavior?

Yes.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: checkpatch: question about "patch prefix 'b' exists" warning
  2022-09-24 21:43   ` Joe Perches
@ 2022-09-25  0:54     ` Masahiro Yamada
  0 siblings, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2022-09-25  0:54 UTC (permalink / raw)
  To: Joe Perches
  Cc: Andy Whitcroft, Dwaipayan Ray, Lukas Bulwahn, Linux Kernel Mailing List

On Sun, Sep 25, 2022 at 6:43 AM Joe Perches <joe@perches.com> wrote:
>
> On Sun, 2022-09-25 at 03:03 +0900, Masahiro Yamada wrote:
> > (+CC: LKML)
> > On Sun, Sep 25, 2022 at 3:00 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
> > > When I used scripts/checkpatch.pl to check a patch file
> > > generated by 'git format-patch', I observed this warning,
> > >
> > >   WARNING: patch prefix 'b' exists, appears to be a -p0 patch
> []
> > > Is this intentional behavior?
>
> Yes.
>


But, my patch is apparently -p1 patch.


Everyone knows "git format-patch" uses a/ and b/ prefixes.

Can we handle 'b' as a special case?

Or, can we warn it only when $root/$p1_prefix is a directory, at least?



-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-25  0:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAK7LNAThr6z-bu3znMps0MaS0m-VYxUPv-DPkr-XzWeLJ5Vu4g@mail.gmail.com>
2022-09-24 18:03 ` checkpatch: question about "patch prefix 'b' exists" warning Masahiro Yamada
2022-09-24 21:43   ` Joe Perches
2022-09-25  0:54     ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).