kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
* checkpatch.pl comment style warnings
@ 2014-04-13 20:49 Greg Donald
  2014-04-13 21:46 ` Greg Freemyer
  2014-04-14 10:52 ` Martin Kepplinger
  0 siblings, 2 replies; 5+ messages in thread
From: Greg Donald @ 2014-04-13 20:49 UTC (permalink / raw)
  To: kernelnewbies

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.

-- 
Greg Donald

^ permalink raw reply	[flat|nested] 5+ messages in thread

* checkpatch.pl comment style warnings
  2014-04-13 20:49 checkpatch.pl comment style warnings Greg Donald
@ 2014-04-13 21:46 ` Greg Freemyer
  2014-04-14  0:04   ` Greg Donald
  2014-04-14 10:52 ` Martin Kepplinger
  1 sibling, 1 reply; 5+ messages in thread
From: Greg Freemyer @ 2014-04-13 21:46 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Apr 13, 2014 at 4:49 PM, Greg Donald <gdonald@gmail.com> wrote:
> When I run checkpatch.pl -f, it complains about comment blocks like

In general use checkpatch.pl on code you are submitting or around code
you are already patching.

Sending in standalone coding style patches 9 times in 10 will result
in a rejected patch.

I think Greg KH recently said he would accept coding style cleanups to
drivers in the staging directory.  But even there I'm sure actual code
improvements would be preferred.

Greg (not KH)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* checkpatch.pl comment style warnings
  2014-04-13 21:46 ` Greg Freemyer
@ 2014-04-14  0:04   ` Greg Donald
  2014-04-14  3:14     ` Greg Freemyer
  0 siblings, 1 reply; 5+ messages in thread
From: Greg Donald @ 2014-04-14  0:04 UTC (permalink / raw)
  To: kernelnewbies

On Sun, Apr 13, 2014 at 4:46 PM, Greg Freemyer <greg.freemyer@gmail.com> wrote:
> In general use checkpatch.pl on code you are submitting or around code
> you are already patching.

But I see patches that do more than one thing get turned down every day.

> Sending in standalone coding style patches 9 times in 10 will result
> in a rejected patch.

Why would 9/10 coding style patches be rejected simply for being
standalone?  I thought standalone patches were preferred.


-- 
Greg Donald

^ permalink raw reply	[flat|nested] 5+ messages in thread

* checkpatch.pl comment style warnings
  2014-04-14  0:04   ` Greg Donald
@ 2014-04-14  3:14     ` Greg Freemyer
  0 siblings, 0 replies; 5+ messages in thread
From: Greg Freemyer @ 2014-04-14  3:14 UTC (permalink / raw)
  To: kernelnewbies



On April 13, 2014 8:04:57 PM EDT, Greg Donald <gdonald@gmail.com> wrote:
>On Sun, Apr 13, 2014 at 4:46 PM, Greg Freemyer
><greg.freemyer@gmail.com> wrote:
>> In general use checkpatch.pl on code you are submitting or around
>code
>> you are already patching.
>
>But I see patches that do more than one thing get turned down every
>day.
>
>> Sending in standalone coding style patches 9 times in 10 will result
>> in a rejected patch.
>
>Why would 9/10 coding style patches be rejected simply for being
>standalone?  I thought standalone patches were preferred.

Most patches I see are sent in as a series.  A coding style patch might be 1 of 2 and then 2 of 2 might be an actual code fix.

Most of the patch series I see tend to have 5 or more patches in the series.

So each patch should accomplish a single goal.  Code clean-up would be a single goal and thus a good discrete patch.

But a series that accomplished nothing beyond code cleanup is rejected by most of the subsystem maintainers.  They figure there are too many patches in progress floating around that will have to be rebased for the value of the cleanup to be worthwhile.

Greg

-- 
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* checkpatch.pl comment style warnings
  2014-04-13 20:49 checkpatch.pl comment style warnings Greg Donald
  2014-04-13 21:46 ` Greg Freemyer
@ 2014-04-14 10:52 ` Martin Kepplinger
  1 sibling, 0 replies; 5+ messages in thread
From: Martin Kepplinger @ 2014-04-14 10:52 UTC (permalink / raw)
  To: kernelnewbies

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.
	 */

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-04-14 10:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-13 20:49 checkpatch.pl comment style warnings Greg Donald
2014-04-13 21:46 ` Greg Freemyer
2014-04-14  0:04   ` Greg Donald
2014-04-14  3:14     ` Greg Freemyer
2014-04-14 10:52 ` Martin Kepplinger

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).