[Linux-kernel-mentees] [PATCH v2] checkpatch: add fix option for NETWORKING_BLOCK_COMMENT_STYLE

Aditya yashsri421 at gmail.com
Thu Nov 19 10:44:05 UTC 2020


On 19/11/20 12:30 am, Lukas Bulwahn wrote:
> On Mi., 18. Nov. 2020 at 18:40, Aditya Srivastava <yashsri421 at gmail.com>
> wrote:
> 
>> Currently, checkpatch warns us for files in 'net/' and 'drivers/net',
>> if we use an empty '/*' line for comment and contents of comments are
>> in next line
>>
>> E.g., running checkpatch on commit 0d52497ac8ee ("iwlwifi: pcie: remove
>> the refs / unrefs from the transport") reports this warning:
>>
>> WARNING: networking block comments don't use an empty /* line, use /*
>> Comment...
>> +               /*
>> +                * If the TXQ is active, then set the timer, if not,
>>
>> Provide a fix by appending the current line contents to previous line
>> and removing the current line
>>
> 
> Patch generally looks good.
> 
> Can you check how many comments in net actually follow that style and how
> many follow another style?
> 
> 

In drivers/net:
Wrong style: 14695 lines
Correct style: 147961 lines (ie around 10 times)

In net/:
Wrong style: 5090 lines
Correct style: 30485 lines

There is also a documentation regarding this different comment format,
and can be found here:
https://www.kernel.org/doc/html/latest/process/coding-style.html#commenting

Thanks
Aditya


More information about the Linux-kernel-mentees mailing list