checkpatch.pl comment style warnings
Martin Kepplinger
martink at posteo.de
Mon Apr 14 06:52:05 EDT 2014
Am 13.04.2014 22:49 schrieb Greg Donald:
> When I run checkpatch.pl -f, it complains about comment blocks like
>
> /*
> * foo
> * bar
> */
>
> with "networking block comments don't use an empty /* line, use /*
> Comment..."
>
> But I found this: http://fr.it-usenet.org/thread/18772/41342/, which
> makes me think that particular checkpatch.pl warning should possibly
> be ignored for code not in net or drivers/net.
>
> 1) Are there different preferred commenting styles for networking code
> versus everything else?
>
> 2) Assuming the comment code above does need fixing, would an example
> fix be as simple as this?
>
> /* foo
> * bar
> */
>
> 3) What about the very similar comment blocks checkpatch.pl doesn't
> currently complain about, do these need fixing too?
>
> /**
> * foo
> * bar
> */
>
>
> Thanks.
it's not necessary to write a codingstyle patch. that's why it also may
get rejected by
maintainers. it's necessary to write new code in the kernel's coding
style.
in https://www.kernel.org/doc/Documentation/CodingStyle everything is
documented:
For files in net/ and drivers/net/ the preferred style for long
(multi-line)
comments is a little different.
/* The preferred comment style for files in net/ and drivers/net
* looks like this.
*
* It is nearly the same as the generally preferred comment style,
* but there is no initial almost-blank line.
*/
More information about the Kernelnewbies
mailing list