Re: checkpatch: question about "patch prefix 'b' exists" warning

From: Masahiro Yamada
Date: Sat Sep 24 2022 - 14:04:29 EST


(+CC: LKML)

On Sun, Sep 25, 2022 at 3:00 AM Masahiro Yamada <masahiroy@xxxxxxxxxx> 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