Re: Checkpatch being daft, Was: [PATCH -v2 08/10] m68k,mm: Extend table allocator for multiple sizes

From: Joe Perches
Date: Fri Feb 07 2020 - 07:58:47 EST


On Fri, 2020-02-07 at 13:30 +0100, Peter Zijlstra wrote:
> On Fri, Feb 07, 2020 at 01:11:54PM +0100, Geert Uytterhoeven wrote:
> > On Fri, Feb 7, 2020 at 12:34 PM Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> > > On Fri, Feb 07, 2020 at 11:56:40AM +0100, Geert Uytterhoeven wrote:
> > > > WARNING: Missing Signed-off-by: line by nominal patch author 'Peter
> > > > Zijlstra <peterz@xxxxxxxxxxxxx>'
> > > > (in all patches)
> > > >
> > > > I can fix that (the From?) up while applying.
> > >
> > > I'm not sure where that warning comes from, but if you feel it needs
> > > fixing, sure. I normally only add the (Intel) thing to the SoB. I've so
> > > far never had complaints about that.
> >
> > Checkpatch doesn't like this.
>
> Ooh, I see, that's a relatively new warning, pretty daft if you ask me.
>
> Now I have to rediscover how I went about teaching checkpatch to STFU ;-)
>
> Joe, should that '$email eq $author' not ignore rfc822 comments? That
> is:
>
> Peter Zijlstra <peterz@xxxxxxxxxxxxx>
>
> and:
>
> Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
>
> are, in actual fact, the same.

checkpatch doesn't really have an rfc822 parser and would
likely require some fairly involved changes to use one.

For instance: adding
---
scripts/checkpatch.pl | 1 +
1 file changed, 1 insertion(+)

diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index f3b8434..959b8ef 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -1164,6 +1164,7 @@ sub parse_email {

$name = trim($name);
$name =~ s/^\"|\"$//g;
+ $name =~ s/\s*\([^\)]+\)\s*//;
$address = trim($address);
$address =~ s/^\<|\>$//g;

---

Into the parse_email function to strip rfc822 comments from
email addresses would just create a couple different warnings.

For now, how about adding --ignore=NO_AUTHOR_SIGN_OFF