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

Dwaipayan Ray dwaipayanray1 at gmail.com
Sun Sep 13 08:16:51 UTC 2020


On Sat, Sep 12, 2020 at 5:51 PM Lukas Bulwahn <lukas.bulwahn at gmail.com>
wrote:
>
>
>
> On Sat, 12 Sep 2020, Dwaipayan Ray wrote:
>
> >
> > > Hmm, your email client still seems to be broken :( If you answer to my
> > > email, it should use ">" not tabs. Maybe you can fix that.>
> > > I looked at your scripts, I did not run them. They look as if they
would
> > > do the job you claim they do. They are more complicated than needed,
but
> > > it was not the task to find a simple solution. So, let us try them.
> > >
> > > Please have a look at this patch:
> > >
> > >
https://lore.kernel.org/linux-kernel-mentees/20200912094826.150170-1-ayush@disroot.org/
> > >
> > > The author states:
> > >
> > > This issue was discovered through a thorough analysis of checkpatch.pl
> > > errors and warnings of type GIT_COMMIT_ID on commits between v5.7 and
> > > v5.8.
> > >
> > > Before applying this patch, checkpatch.pl reported 342 errors of type
> > > GIT_COMMIT_ID. After applying patch, errors reduced to 284.
> > >
> > >
> > > If your scripts work, you should be able to confirm the statement.
> > >
> > > The tasks are:
> > >
> > > 1. Run your scripts and create a full statistics of all error types
with
> > > their according count for v5.7..v5.8.
> > >
> > > 2. Apply the patch with git am.
> > >
> > > 3. Run your scripts again and create a new statistics.
> > >
> > > 4. Compare before and after
> > >
> > > 5. Make all results available on your github repository.
> > >

> > The last time checkpatch.pl took awfully long to run on so many
commits. :(
> > So, it might take a while but I will report my findings on this as soon
> > it is done processing.
> >
>
> I guess a bit computing power is required, SSDs, parallelization and
> multi-core systems help :)
>

Hi,
So i managed to add parallelization in my script and the generation was a
lot faster
( brought down from >3 hours to <40 mins ).
The script is at:
https://github.com/raydwaipayan/lkm-task-1/blob/master/run_checkpatch.pl

As you told, I applied the patch and compared the statistics. In my case
however the statistics
vary. Before patching total no. of errors of type GIT_COMMIT_ID was 270,
and after patching,
the number went down to 251. This is in constrast to the author's finding
but the number
reduces, so the patch works apparently.

I am posting the diff of statistics before and after the patch:

99c99
< COMMIT_LOG_LONG_LINE: 1059
---
> COMMIT_LOG_LONG_LINE: 1057
126c126
< GIT_COMMIT_ID: 270
---
> GIT_COMMIT_ID: 251
142,143c142,143
< Warnings generated: 25661
< Errors generated: 4768
---
> Warnings generated: 25659
> Errors generated: 4749

As you can see, the warnings of type COMMIT_LOG_LONG_LINE decreased too.

The entire output and scripts can be found at:
https://github.com/raydwaipayan/lkm-task-1


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


More information about the Linux-kernel-mentees mailing list