netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2] docs: netdev: document guidance on cleanup patches
@ 2024-10-09  9:12 Simon Horman
  2024-10-09  9:42 ` Przemek Kitszel
  2024-10-10 16:10 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 4+ messages in thread
From: Simon Horman @ 2024-10-09  9:12 UTC (permalink / raw)
  To: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet
  Cc: netdev, workflows, linux-doc

The purpose of this section is to document what is the current practice
regarding clean-up patches which address checkpatch warnings and similar
problems. I feel there is a value in having this documented so others
can easily refer to it.

Clearly this topic is subjective. And to some extent the current
practice discourages a wider range of patches than is described here.
But I feel it is best to start somewhere, with the most well established
part of the current practice.

--
I did think this was already documented. And perhaps it is.
But I was unable to find it after a quick search.

Signed-off-by: Simon Horman <horms@kernel.org>
---
Changes in v2:
- Drop RFC designation
- Correct capitalisation of heading
- Add that:
  + devm_ conversions are also discouraged, outside the context of other work
  + Spelling and grammar fixes are not discouraged
- Reformat text accordingly
- Link to v1: https://lore.kernel.org/r/20241004-doc-mc-clean-v1-1-20c28dcb0d52@kernel.org
---
 Documentation/process/maintainer-netdev.rst | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst
index c9edf9e7362d..1ae71e31591c 100644
--- a/Documentation/process/maintainer-netdev.rst
+++ b/Documentation/process/maintainer-netdev.rst
@@ -355,6 +355,8 @@ just do it. As a result, a sequence of smaller series gets merged quicker and
 with better review coverage. Re-posting large series also increases the mailing
 list traffic.
 
+.. _rcs:
+
 Local variable ordering ("reverse xmas tree", "RCS")
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -391,6 +393,21 @@ APIs and helpers, especially scoped iterators. However, direct use of
 ``__free()`` within networking core and drivers is discouraged.
 Similar guidance applies to declaring variables mid-function.
 
+Clean-up patches
+~~~~~~~~~~~~~~~~
+
+Netdev discourages patches which perform simple clean-ups, which are not in
+the context of other work. For example:
+
+* Addressing ``checkpatch.pl`` warnings
+* Addressing :ref:`Local variable ordering<rcs>` issues
+* Conversions to device-managed APIs (``devm_`` helpers)
+
+This is because it is felt that the churn that such changes produce comes
+at a greater cost than the value of such clean-ups.
+
+Conversely, spelling and grammar fixes are not discouraged.
+
 Resending after review
 ~~~~~~~~~~~~~~~~~~~~~~
 


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

* Re: [PATCH net v2] docs: netdev: document guidance on cleanup patches
  2024-10-09  9:12 [PATCH net v2] docs: netdev: document guidance on cleanup patches Simon Horman
@ 2024-10-09  9:42 ` Przemek Kitszel
  2024-10-09 12:50   ` Simon Horman
  2024-10-10 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 1 reply; 4+ messages in thread
From: Przemek Kitszel @ 2024-10-09  9:42 UTC (permalink / raw)
  To: Simon Horman, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Jonathan Corbet
  Cc: netdev, workflows, linux-doc, Tony Nguyen

On 10/9/24 11:12, Simon Horman wrote:
> The purpose of this section is to document what is the current practice
> regarding clean-up patches which address checkpatch warnings and similar
> problems. I feel there is a value in having this documented so others
> can easily refer to it.
> 
> Clearly this topic is subjective. And to some extent the current
> practice discourages a wider range of patches than is described here.
> But I feel it is best to start somewhere, with the most well established
> part of the current practice.
> 
> --
> I did think this was already documented. And perhaps it is.
> But I was unable to find it after a quick search.
> 
> Signed-off-by: Simon Horman <horms@kernel.org>

Looks like you wanted to say "please don't submit autogenerated clenups"

> ---
> Changes in v2:
> - Drop RFC designation
> - Correct capitalisation of heading
> - Add that:
>    + devm_ conversions are also discouraged, outside the context of other work

devm_ is generally discouraged in netdev, so much that I will welcome
the opposite cleanup :)

Your write-up on this is correct, no objections.

Perhaps we could say more about the status of the code that is fixed -
Maintained/Odd fixes/Orphaned - I would don't touch anything below
"Maintained" for good reason

>    + Spelling and grammar fixes are not discouraged
> - Reformat text accordingly
> - Link to v1: https://lore.kernel.org/r/20241004-doc-mc-clean-v1-1-20c28dcb0d52@kernel.org
> ---
>   Documentation/process/maintainer-netdev.rst | 17 +++++++++++++++++
>   1 file changed, 17 insertions(+)
> 
> diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst
> index c9edf9e7362d..1ae71e31591c 100644
> --- a/Documentation/process/maintainer-netdev.rst
> +++ b/Documentation/process/maintainer-netdev.rst
> @@ -355,6 +355,8 @@ just do it. As a result, a sequence of smaller series gets merged quicker and
>   with better review coverage. Re-posting large series also increases the mailing
>   list traffic.
>   
> +.. _rcs:
> +
>   Local variable ordering ("reverse xmas tree", "RCS")
>   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>   
> @@ -391,6 +393,21 @@ APIs and helpers, especially scoped iterators. However, direct use of
>   ``__free()`` within networking core and drivers is discouraged.
>   Similar guidance applies to declaring variables mid-function.
>   
> +Clean-up patches
> +~~~~~~~~~~~~~~~~
> +
> +Netdev discourages patches which perform simple clean-ups, which are not in
> +the context of other work. For example:
> +
> +* Addressing ``checkpatch.pl`` warnings
> +* Addressing :ref:`Local variable ordering<rcs>` issues
> +* Conversions to device-managed APIs (``devm_`` helpers)
> +
> +This is because it is felt that the churn that such changes produce comes
> +at a greater cost than the value of such clean-ups.
> +
> +Conversely, spelling and grammar fixes are not discouraged.
> +
>   Resending after review
>   ~~~~~~~~~~~~~~~~~~~~~~

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

* Re: [PATCH net v2] docs: netdev: document guidance on cleanup patches
  2024-10-09  9:42 ` Przemek Kitszel
@ 2024-10-09 12:50   ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2024-10-09 12:50 UTC (permalink / raw)
  To: Przemek Kitszel
  Cc: David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
	Jonathan Corbet, netdev, workflows, linux-doc, Tony Nguyen

On Wed, Oct 09, 2024 at 11:42:14AM +0200, Przemek Kitszel wrote:
> On 10/9/24 11:12, Simon Horman wrote:
> > The purpose of this section is to document what is the current practice
> > regarding clean-up patches which address checkpatch warnings and similar
> > problems. I feel there is a value in having this documented so others
> > can easily refer to it.
> > 
> > Clearly this topic is subjective. And to some extent the current
> > practice discourages a wider range of patches than is described here.
> > But I feel it is best to start somewhere, with the most well established
> > part of the current practice.
> > 
> > --
> > I did think this was already documented. And perhaps it is.
> > But I was unable to find it after a quick search.
> > 
> > Signed-off-by: Simon Horman <horms@kernel.org>
> 
> Looks like you wanted to say "please don't submit autogenerated clenups"

:)

> > ---
> > Changes in v2:
> > - Drop RFC designation
> > - Correct capitalisation of heading
> > - Add that:
> >    + devm_ conversions are also discouraged, outside the context of other work
> 
> devm_ is generally discouraged in netdev, so much that I will welcome
> the opposite cleanup :)
> 
> Your write-up on this is correct, no objections.
> 
> Perhaps we could say more about the status of the code that is fixed -
> Maintained/Odd fixes/Orphaned - I would don't touch anything below
> "Maintained" for good reason

I agree that there is room to expand on that.  But I would rather defer on
that, because, as mentioned by Jakub in his review of v1, that quickly
becomes quite subjective.

IOW, let's start with something and improve on it later.

...

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

* Re: [PATCH net v2] docs: netdev: document guidance on cleanup patches
  2024-10-09  9:12 [PATCH net v2] docs: netdev: document guidance on cleanup patches Simon Horman
  2024-10-09  9:42 ` Przemek Kitszel
@ 2024-10-10 16:10 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-10 16:10 UTC (permalink / raw)
  To: Simon Horman
  Cc: davem, edumazet, kuba, pabeni, corbet, netdev, workflows,
	linux-doc

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 09 Oct 2024 10:12:19 +0100 you wrote:
> The purpose of this section is to document what is the current practice
> regarding clean-up patches which address checkpatch warnings and similar
> problems. I feel there is a value in having this documented so others
> can easily refer to it.
> 
> Clearly this topic is subjective. And to some extent the current
> practice discourages a wider range of patches than is described here.
> But I feel it is best to start somewhere, with the most well established
> part of the current practice.
> 
> [...]

Here is the summary with links:
  - [net,v2] docs: netdev: document guidance on cleanup patches
    https://git.kernel.org/netdev/net/c/aeb218d900e3

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2024-10-10 16:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-09  9:12 [PATCH net v2] docs: netdev: document guidance on cleanup patches Simon Horman
2024-10-09  9:42 ` Przemek Kitszel
2024-10-09 12:50   ` Simon Horman
2024-10-10 16:10 ` patchwork-bot+netdevbpf

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