[Linux-kernel-mentees] Linux kernel checkpatch.pl mentorship

Dwaipayan Ray dwaipayanray1 at gmail.com
Mon Sep 14 15:39:01 UTC 2020

> > The third candidate is related to the warning:
> >
> > WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal
patch author ...
> >
> > I found several such commits in which the author had used different
mail addresses in the
> > signed-off -by section, due to which this warning is generated.
> >
> > An example is Commit dc5bdb68b5b3 .
> > Git log show:
> > Author: Daniel Vetter <daniel.vetter at ffwll.ch>
> > ....,.
> > Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
> >
> > This is infact a common scenario. I easily found another commit
> > Git log shows:
> > Author: Minas Harutyunyan <Minas.Harutyunyan at synopsys.com>
> > ...
> > Signed-off-by: Minas Harutyunyan <hminas at synopsys.com>
> >
> > This warning could be avoided or at least handled better.
> >
> >
> > I would like to know if any of them can be worked on.
> >
> This last one might be good to look into.
> But what is your specific solution you have in mind?
> There is a file .mailmap in the repository that allows some kind of
> mapping. Maybe that is helpful.
> I suggest that you describe your proposed change in a clear way.
> Then, we can discuss if that change is reasonable or not.

I checked the .mailmap file and it doesn't have all the email addresses. So
it might not
be effective.

checkpatch.pl seems to compare only the email addresses to determine
whether the author
has signed off.

checkpatch, line 2673:
if ($author ne '') {
                if (same_email_addresses($1, $author)) {
                    $authorsignoff = 1;

This causes numerous false positives if the author uses a different mail,
which seems to be quite frequent.

A possible solution would be to compare the names, i.e. $1 and $author, and
keep its result stored
in some variable authorsignoff_byname. If the author's mail is not found,
but his name matches,
there can be a better warning message on the lines of:
"Possible missing signed-off-by line by nominal author. Author's email
$email does not match signed off email. $email2"

Or, if the warning message cannot be changed, there could be verbose
information regarding the mismatch of email.
Is this feasible?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20200914/e1d75301/attachment-0001.html>

More information about the Linux-kernel-mentees mailing list