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

Dwaipayan Ray dwaipayanray1 at gmail.com
Thu Sep 17 13:09:10 UTC 2020


> If you do your homework, proper research what was decided in the past,
> proper evaluations what the difference of your change is, proper
> implementation, proper arguments for your change, it has high chances of
> being accepted. Many agree that checkpatch.pl can be useful, but many
> agree that it needs some improvements.
>
> It is certainly not a quick improvement, and needs some thought to make it
> really better.
>
> >
> > > You can try to work that through or look for another case of potential
> > > checkpatch.pl improvement in your evaluation data.
>

Hi,
I would like to report you another finding about AUTHOR_SIGN_OFF.

I found that some commits with the same author mail and sign off mail
also threw off this warning when there were non-ascii characters in
the name.
Let me give some examples:

Commit 9d9cc58aff46 :

Author: 周琰杰 (Zhou Yanjie) <zhouyanjie at wanyeetech.com>
.....
Signed-off-by: 周琰杰 (Zhou Yanjie) <zhouyanjie at wanyeetech.com>

As you can see, there should have been no error message, but checkpatch
gave this:

WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal
 patch author ''


Also commit 440d7a6f7390 and commit 424c85e1ffea by the same person
threw the error again. Evidently non ascii characters cause the parsing to
fail.
Both had the same chinese characters in the name.


I also found another person with the same issue.
Commit b03628b73564
Author: Niklas Söderlund <niklas.soderlund+renesas at ragnatech.se>
...
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas at ragnatech.se>

Checkpatch gave the warning:
WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal
patch author '' . The string here is again empty.

Another same issue
Commit f0a087a533b3
Author: Vesa Jääskeläinen <vesa.jaaskelainen at vaisala.com>
...
Signed-off-by: Vesa Jääskeläinen <vesa.jaaskelainen at vaisala.com>

So you see in all these cases non ascii characters are present. I looked
into checkpatch.pl .

line 2662:
        if (decode("MIME-Header", $line) =~ /^From:\s*(.*)/) {
           $author = $1;
            $author = encode("utf8", $author) if ($line =~ /=\?utf-8\?/i);
            $author =~ s/"//g;
            $author = reformat_email($author);
        }

When i looked into $line, it gave below:
From: =?UTF-8?q?=E5=91=A8=E7=90=B0=E6=9D=B0=20=28Zhou=20Yanjie
=29?= <zhouyanjie at wanyeetech.com>

And at the end of this block, $author was equal to ''.
There seems to be a parsing problem there.

Does this seem like a proper fixable candidate?

Thanks,
Dwaipayan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/linux-kernel-mentees/attachments/20200917/ce71f9fa/attachment.html>


More information about the Linux-kernel-mentees mailing list