[U-Boot] [PATCH] patman: Only apply patches when we know the original HEAD
Masahiro Yamada
yamada.m at jp.panasonic.com
Tue Jun 24 12:24:25 CEST 2014
On Mon, 23 Jun 2014 06:11:28 -0600
Simon Glass <sjg at chromium.org> wrote:
> +Doug who may have some thoughts here.
>
> HI Masahiro,
>
> On 23 June 2014 00:28, Masahiro Yamada <yamada.m at jp.panasonic.com> wrote:
>
> > Hi Simon,
> >
> > On Sun, 22 Jun 2014 22:54:43 -0600
> > Simon Glass <sjg at chromium.org> wrote:
> >
> > > Hi,
> > >
> > > On Jun 22, 2014 10:23 PM, "Fabio Estevam" <festevam at gmail.com> wrote:
> > > >
> > > > On Mon, Jun 23, 2014 at 12:39 AM, Simon Glass <sjg at chromium.org>
> > wrote:
> > > >
> > > > > The whitespace problems are not common but they do happen sometimes -
> > > > > or at least I have seen it at times. Unless perhaps checkpatch has
> > got
> > > > > smarter?
> > > >
> > > > Couldn't ./scripts/cleanpatch be used to fix the whitespace issues?
> > >
> > > Maybe. If you know how to test this please give it a try.
> >
> > Note, I do understand all the questions, but the problem is I am not
> completely sure how this happens.
>
>
> > Does Patman fix the whitespace issues?
> >
> > No, it just runs 'git am' which will then report them.
>
>
> >
> > I'm getting confused.
> >
> > To make things clearer, please let me ask you some questions.
> >
> > [1] What does "whitespace errors" mean here?
> >
> > - Trailing whitespaces ?
> > - Spaces before TAB indent ?
> > - Or what else ?
> >
>
> Both of those, plus a blank line at EOF as I understand it.
>
>
> >
> > [2] What do you expect Patman to do when it finds those errors?
> > - Just display an error message ?
> >
>
> Yes (it displays an error from 'git am')
>
>
> > or
> > - Fix the issues automatically ?
> >
>
> No - apart from removing tags and adding notes patman avoids changing
> patches as a matter of policy.
>
> >
> > [3] Which features were missing from scripts/checkpatch.pl
> > when you wrote Patman first ?
> >
>
> It's really a belts-and-braces check that nothing will go wrong when the
> patches are applied. I have had it report errors to me on my own patches,
> although not recently. I'm not sure if it is still needed though.
OK. It seems better to check.
I added some patches which include whitespace errors
and ran Patman.
It looks like nothing changes with/without -a option.
$ tools/patman/patman -a -c 3
1 warnings for 0002-arm-commit-2.patch:
Line 21/0 has space before tab
1 warnings for 0003-arm-commit-3.patch:
Found possible blank line(s) at end of file 'None'
Cleaned 3 patches
1 errors, 0 warnings, 0 checks for 0001-arm-commit-1.patch:
error: common/cmd_mmc.c,22: trailing whitespace
1 errors, 2 warnings, 0 checks for 0002-arm-commit-2.patch:
error: common/cmd_mmc.c,26: code indent should use tabs where possible
warning: common/cmd_mmc.c,26: please, no space before tabs
warning: common/cmd_mmc.c,26: please, no spaces at the start of a line
checkpatch.pl found 2 error(s), 2 warning(s), 0 checks(s)
$ tools/patman/patman -c 3
1 warnings for 0002-arm-commit-2.patch:
Line 21/0 has space before tab
1 warnings for 0003-arm-commit-3.patch:
Found possible blank line(s) at end of file 'None'
Cleaned 3 patches
1 errors, 0 warnings, 0 checks for 0001-arm-commit-1.patch:
error: common/cmd_mmc.c,22: trailing whitespace
1 errors, 2 warnings, 0 checks for 0002-arm-commit-2.patch:
error: common/cmd_mmc.c,26: code indent should use tabs where possible
warning: common/cmd_mmc.c,26: please, no space before tabs
warning: common/cmd_mmc.c,26: please, no spaces at the start of a line
checkpatch.pl found 2 error(s), 2 warning(s), 0 checks(s)
Best Regards
Masahiro Yamada
More information about the U-Boot
mailing list