linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: Joe Perches <joe@perches.com>,
	linux-kernel-mentees@lists.linuxfoundation.org,
	apw@canonical.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] checkpatch: extend author Signed-off-by check for split From: header
Date: Mon, 21 Sep 2020 14:01:41 +0530	[thread overview]
Message-ID: <CABJPP5Coi2b3xHcmf+dGTmFpsQ1QjNKixA1Yz-n42Mzjc4YngQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2009210940060.7483@felia>

On Mon, Sep 21, 2020 at 1:19 PM Lukas Bulwahn <lukas.bulwahn@gmail.com> wrote:
>
>
> Dwaipayan, just a quick nitpick:
>
> Your subject line has two spaces in front of 'From:'
>
> On Sun, 20 Sep 2020, Dwaipayan Ray wrote:
>
> > Checkpatch did not handle cases where the author From: header
> > was split into multiple lines. The author identity could not
> > be resolved and checkpatch generated a false NO_AUTHOR_SIGN_OFF
> > warning.
> >
> > A typical example is Commit e33bcbab16d1 ("tee: add support for
>
> You can write 'Commit' lowercase as 'commit'.
>
> > session's client UUID generation"). When checkpatch was run on
> > this commit, it displayed:
> >
> > "WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal
> > patch author ''"
> >
> > This was due to split header lines not being handled properly and
> > the author himself wrote in Commit cd2614967d8b ("checkpatch: warn
> > if missing author Signed-off-by"):
> >
>
> Same here.
>
> > "Split From: headers are not fully handled: only the first part
> > is compared."
> >
> > Support split From: headers by correctly parsing the header
> > extension lines. RFC 2822, Section-2.2.3 stated that each extended
> > line must start with a WSP character (a space or htab). The solution
> > was therefore to concatenate the lines which start with a WSP to
> > get the correct long header.
> >
> > Suggested-by: Joe Perches <joe@perches.com>
> > Link: https://lore.kernel.org/linux-kernel-mentees/f5d8124e54a50480b0a9fa638787bc29b6e09854.camel@perches.com/
> > Signed-off-by: Dwaipayan Ray <dwaipayanray1@gmail.com>
>
>
>
> On v5.4..v5.7 using data from a previous evaluation, I found 116 commits
> with
> the error message "Missing Signed-off-by: line by nominal patch author
> ''",
> when running ./scripts/checkpatch.pl on v5.9-rc6.
>
>
> After this patch application, all 116 warnings disappeared with "Missing
> Signed-off-by: line by nominal patch author ''"
> and these three new warnings appeared:
>
> 322f6a3182d42df18059a89c53b09d33919f755e:35: WARNING: Missing Signed-off-by: line by nominal patch author 'Johnson CH Chen <JohnsonCH.Chen@moxa.com>'
> 18977008f44c66bdd6d20bb432adf71372589303:37: WARNING: Missing Signed-off-by: line by nominal patch author '"Marek Szyprowski via Linux.Kernel.Org" <m.szyprowski=samsung.com@linux.kernel.org>'
> ed3520427f57327f581de0cc28c1c30df08f0103:51: WARNING: Missing Signed-off-by: line by nominal patch author 'Chengguang Xu via Linux-f2fs-devel <linux-f2fs-devel@lists.sourceforge.net>'
>
> With that said, I think am happy to add my tags:
>
> Reviewed-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
> Tested-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
>
> Dwaipayan, you can fix the minor commit message issues above, add the tags
> from Joe and me to the end of your commit message and send the patch as v3
> out to Andrew Morton with everyone sofar as CC. Andrew Morton will pick up
> the patch and make it travel to Linus Torvalds.
>
> Good job so far!
>
> After you did that, let us develop and discuss a plan to refine the
> 'trickier' part of false AUTHOR_SIGN_OFF warnings for developer and
> maintainers with some known special author and sign-off procedures.
>
> Lukas
>
> > ---
> >  scripts/checkpatch.pl | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> > index 504d2e431c60..9e65d21456f1 100755
> > --- a/scripts/checkpatch.pl
> > +++ b/scripts/checkpatch.pl
> > @@ -2661,6 +2661,10 @@ sub process {
> >  # Check the patch for a From:
> >               if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
> >                       $author = $1;
> > +                     my $curline = $linenr;
> > +                     while(defined($rawlines[$curline]) && ($rawlines[$curline++] =~ /^[ \t]\s*(.*)/)) {
> > +                             $author .= $1;
> > +                     }
> >                       $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
> >                       $author =~ s/"//g;
> >                       $author = reformat_email($author);
> > --
> > 2.27.0
> >
> >

Hi,
Sure! I will do that and get back to you.

Thanks,
Dwaipayan.

      reply	other threads:[~2020-09-21  8:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-20  9:17 [PATCH v2] checkpatch: extend author Signed-off-by check for split From: header Dwaipayan Ray
2020-09-20 15:09 ` Joe Perches
2020-09-20 16:22   ` Dwaipayan Ray
2020-09-20 16:54     ` Joe Perches
2020-09-21  7:39       ` Lukas Bulwahn
2020-09-21  9:47         ` Joe Perches
2020-09-20 17:39 ` Joe Perches
2020-09-21  7:49 ` Lukas Bulwahn
2020-09-21  8:31   ` Dwaipayan Ray [this message]

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=CABJPP5Coi2b3xHcmf+dGTmFpsQ1QjNKixA1Yz-n42Mzjc4YngQ@mail.gmail.com \
    --to=dwaipayanray1@gmail.com \
    --cc=apw@canonical.com \
    --cc=joe@perches.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lukas.bulwahn@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).