linux-kernel-mentees.lists.linuxfoundation.org archive mirror
 help / color / mirror / Atom feed
From: Dwaipayan Ray <dwaipayanray1@gmail.com>
To: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Cc: linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [Linux-kernel-mentees] Linux kernel checkpatch.pl mentorship
Date: Sat, 12 Sep 2020 14:39:06 +0530	[thread overview]
Message-ID: <CABJPP5AWNpYyx5asMNZccqbq07ZW+pH+EwJ+KTZ+SSOAnWZwVQ@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2009110925160.9220@felia>


[-- Attachment #1.1: Type: text/plain, Size: 3908 bytes --]

On Fri, Sep 11, 2020 at 12:59 PM Lukas Bulwahn <lukas.bulwahn@gmail.com>
wrote:

> Dear Dwaipayan,
>
>
> The zeroth task is to learn suitable netiquette for the communication with
> the kernel community.
>
> First, please do not top-post.
>
>     A: Because we read from top to bottom, left to right.
>     Q: Why should I start my reply below the quoted text?
>
>     A: Because it messes up the order in which people normally read text.
>     Q: Why is top-posting such a bad thing?
>
>     A: The lost context.
>     Q: What makes top-posted replies harder to read than bottom-posted?
>
>     A: Yes.
>     Q: Should I trim down the quoted part of an email to which I'm
> replying?
>
> Second, please always CC: linux-kernel-mentees@lists.linuxfoundation.org.
>
> Third, set up your email client according to the kernel community rules.
>
>
> Then, the first task is to run checkpatch.pl on a few kernel patches and
> collect the results. When you have that, please share your script with
> me, e.g., in a github repository.
>
>
> Hints to the first task:
>
> Can you create a list of all non-merge commits that were added in the
> version v5.8 of the kernel, i.e., all non-merge commits that are in v5.8
> and not already in v5.7?
>
> Can you share the script/command you executed and the resulting list on
> github?
>
> Can you run your script on all commits of this list above and record
> all checkpatch.pl reports, and store them in your github repository?
>
> Can you suggest ideas how to aggregate the findings and create a
> statistics? For example: Which type of error is reported most?
> Can you implement that idea?
>
>
> I also suggest to have a look at the options ./scripts/checkpatch.pl
> --list-types and ./scripts/checkpatch.pl --show-types. The option
> --show-types changes the output of checkpatch.pl to list type
> identifiers,
> so it is easier to parse and aggregate the output.
>
> Please also share the script you create for that purpose on your
> github repository.
>
>
> The second task is to pick one warning that appears often and improve
> checkpatch.pl to handle that better and get it accepted by the kernel
> community.
>
> Hints to the second task follow when the first task is solved.
>
> If you fail on any of those tasks, you are out of the selection process.
>
> I could implement that with just a few lines of code changes, but please
> do not underestimate the learning curve here. I hope you are very fit in
> Perl, that is required for this project.
>
>
> Lukas
>


Hello Sir,
I have gone through the zeroth task and I am aware of the mailing rules
now.
Also I have implemented the first task and I would like you to review it.

The task was to run checkpatch.pl on some commits and aggregate the
reports.

The first subtask was to collect the non merge commits between versions 5.7
and 5.8.
I aggregated the commit hashes and author names into a single file using
git's log
and pretty format directives.

The next subtask was to run checkpatch.pl on all the given commits.
I wrote a perl script to this effect which reads the commits stored in the
file and runs the checkpatch.pl script with the commit hash. Also I used
the
--show-types directives in this stage which allowed me easier collection of
warning and error identifiers.

The final subtask was to aggregate and parse the data. Looking at the
checkpatch's output
format, I determined it was enough to parse only the first two tokens from
each line.
I calculated three possibilities:  "WARNING:{warning_identifier}",
"ERROR:{error_identifier}",
"Commit {commit_abbrev_hash}", and aggregated these values.

Finally I used them to find total commits read, total errors, total
warnings,
and the most frequent warnings and errors from checkpatch's output.

I have uploaded the scripts and output files to
https://github.com/raydwaipayan/lkm-task-1

Hoping to get your review soon.

Thanking you,
Dwaipayan.

[-- Attachment #1.2: Type: text/html, Size: 5552 bytes --]

[-- Attachment #2: Type: text/plain, Size: 201 bytes --]

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

       reply	other threads:[~2020-09-12  9:09 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CABJPP5CSa_QowD-O3_E5ndoQJvuBv=n2x5WG-acwQKE=rt5+Rw@mail.gmail.com>
     [not found] ` <alpine.DEB.2.21.2009110925160.9220@felia>
2020-09-12  9:09   ` Dwaipayan Ray [this message]
2020-09-12 11:03     ` [Linux-kernel-mentees] Linux kernel checkpatch.pl mentorship Lukas Bulwahn
2020-09-12 12:08       ` Dwaipayan Ray
2020-09-12 12:21         ` Lukas Bulwahn
2020-09-13  8:16           ` Dwaipayan Ray
2020-09-13 11:05             ` Lukas Bulwahn
     [not found]               ` <CABJPP5BmRcC+OTSjuX_QrYononVq__DkhjGOgiKrP147MAXK+g@mail.gmail.com>
     [not found]                 ` <alpine.DEB.2.21.2009132015570.6806@felia>
2020-09-13 18:23                   ` Dwaipayan Ray
     [not found]                 ` <alpine.DEB.2.21.2009132010300.6806@felia>
2020-09-13 18:39                   ` Dwaipayan Ray
2020-09-14  5:17                     ` Lukas Bulwahn
2020-09-14 12:31                       ` Dwaipayan Ray
2020-09-14 13:49                         ` Lukas Bulwahn
2020-09-14 15:39                           ` Dwaipayan Ray
2020-09-14 18:32                             ` Lukas Bulwahn
2020-09-15 13:04                               ` Dwaipayan Ray
2020-09-16  7:01                                 ` Lukas Bulwahn
2020-09-17 13:09                                   ` Dwaipayan Ray
2020-09-17 13:41                                     ` Dwaipayan Ray
2020-09-17 14:18                                       ` Lukas Bulwahn
2020-09-17 14:43                                         ` Dwaipayan Ray
2020-09-17 15:03                                           ` Lukas Bulwahn
2020-09-17 14:13                                     ` Lukas Bulwahn

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=CABJPP5AWNpYyx5asMNZccqbq07ZW+pH+EwJ+KTZ+SSOAnWZwVQ@mail.gmail.com \
    --to=dwaipayanray1@gmail.com \
    --cc=linux-kernel-mentees@lists.linuxfoundation.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).