<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 11, 2020 at 12:59 PM Lukas Bulwahn <<a href="mailto:lukas.bulwahn@gmail.com">lukas.bulwahn@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Dwaipayan,<br>
<br>
<br>
The zeroth task is to learn suitable netiquette for the communication with <br>
the kernel community.<br>
<br>
First, please do not top-post.<br>
<br>
    A: Because we read from top to bottom, left to right.<br>
    Q: Why should I start my reply below the quoted text?<br>
<br>
    A: Because it messes up the order in which people normally read text.<br>
    Q: Why is top-posting such a bad thing?<br>
<br>
    A: The lost context.<br>
    Q: What makes top-posted replies harder to read than bottom-posted?<br>
<br>
    A: Yes.<br>
    Q: Should I trim down the quoted part of an email to which I'm <br>
replying?<br>
<br>
Second, please always CC: <a href="mailto:linux-kernel-mentees@lists.linuxfoundation.org" target="_blank">linux-kernel-mentees@lists.linuxfoundation.org</a>.<br>
<br>
Third, set up your email client according to the kernel community rules.<br>
<br>
<br>
Then, the first task is to run <a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> on a few kernel patches and<br>
collect the results. When you have that, please share your script with<br>
me, e.g., in a github repository.<br>
<br>
<br>
Hints to the first task:<br>
<br>
Can you create a list of all non-merge commits that were added in the<br>
version v5.8 of the kernel, i.e., all non-merge commits that are in v5.8<br>
and not already in v5.7?<br>
<br>
Can you share the script/command you executed and the resulting list on <br>
github?<br>
<br>
Can you run your script on all commits of this list above and record<br>
all <a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> reports, and store them in your github repository?<br>
<br>
Can you suggest ideas how to aggregate the findings and create a<br>
statistics? For example: Which type of error is reported most?<br>
Can you implement that idea?<br>
<br>
<br>
I also suggest to have a look at the options ./scripts/<a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> <br>
--list-types and ./scripts/<a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> --show-types. The option <br>
--show-types changes the output of <a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> to list type identifiers, <br>
so it is easier to parse and aggregate the output.<br>
<br>
Please also share the script you create for that purpose on your<br>
github repository.<br>
<br>
<br>
The second task is to pick one warning that appears often and improve<br>
<a href="http://checkpatch.pl" rel="noreferrer" target="_blank">checkpatch.pl</a> to handle that better and get it accepted by the kernel<br>
community.<br>
<br>
Hints to the second task follow when the first task is solved.<br>
<br>
If you fail on any of those tasks, you are out of the selection process.<br>
<br>
I could implement that with just a few lines of code changes, but please <br>
do not underestimate the learning curve here. I hope you are very fit in <br>
Perl, that is required for this project.<br>
<br>
<br>
Lukas<br></blockquote><div><br></div><div><br></div><div>Hello Sir,</div><div>I have gone through the zeroth task and I am aware of the mailing rules now. </div><div>Also I have implemented the first task and I would like you to review it.</div><div><br></div><div>The task was to run <a href="http://checkpatch.pl">checkpatch.pl</a> on some commits and aggregate the reports. </div><div><br></div><div>The first subtask was to collect the non merge commits between versions 5.7 and 5.8. </div><div>I aggregated the commit hashes and author names into a single file using git's log</div><div>and pretty format directives.</div><div><br></div><div>The next subtask was to run <a href="http://checkpatch.pl">checkpatch.pl</a> on all the given commits.</div><div>I wrote a perl script to this effect which reads the commits stored in the </div><div>file and runs the <a href="http://checkpatch.pl">checkpatch.pl</a> script with the commit hash. Also I used the </div><div>--show-types directives in this stage which allowed me easier collection of</div><div>warning and error identifiers.</div><div><br></div><div>The final subtask was to aggregate and parse the data. Looking at the checkpatch's output </div><div>format, I determined it was enough to parse only the first two tokens from each line.</div><div>I calculated three possibilities:  "WARNING:{warning_identifier}", "ERROR:{error_identifier}",</div><div>"Commit {commit_abbrev_hash}", and aggregated these values.</div><div><br></div><div>Finally I used them to find total commits read, total errors, total warnings,</div><div>and the most frequent warnings and errors from checkpatch's output. </div><div><br></div><div>I have uploaded the scripts and output files to <a href="https://github.com/raydwaipayan/lkm-task-1">https://github.com/raydwaipayan/lkm-task-1</a></div><div><br></div><div>Hoping to get your review soon.</div><div><br></div><div>Thanking you,</div><div>Dwaipayan.</div></div></div>