[Linux-kernel-mentees] [PATCH] checkpatch: ignore files not following NETWORKING_BLOCK_COMMENT_STYLE

Lukas Bulwahn lukas.bulwahn at gmail.com
Mon Dec 21 05:27:55 UTC 2020


On Sun, Dec 20, 2020 at 7:33 PM Aditya Srivastava <yashsri421 at gmail.com> wrote:
>
> Currently checkpatch.pl gives warning for NETWORKING_BLOCK_COMMENT_STYLE
> for files in net/ and drivers/net which do not follow the networking
> comment style.
> But some of these files seem to follow the generic comment style instead
> of networking style and some rather mixed style of comment.
>
> For e.g., drivers/net/wireless/ralink/rt2x00 largely follows generic
> kernel comment style in spite of being inside drivers/net.
>
> Provide an ignore file(".networking_block_comment_styles.ignore"), where
> users can add the files they want to ignore this warning.
>

I believe that is a really bad design decision here.

Imagine that in one directory, the maintainer wants to adjust ten
rules for checkpatch.

Are we going to implement this logic for those ten rules individually?
Is the maintainer going to add

None of that is obviously acceptable: 1. because there are better
design decisions; 2. because tailoring checkpatch would simply not be
worth the cost of having all those individual files laying around in
the repository and the complication throughout the whole script.

Also, you already recognized that there is already a feature to ignore
or select rules through command-line parameters.

So, how about coming up with a proper .checkpatch config file format
and then use the already available feature to configure the checkpatch
run?

Lukas


More information about the Linux-kernel-mentees mailing list