Skip to content

Commit aeb218d

Browse files
hormskuba-moo
authored andcommitted
docs: netdev: document guidance on cleanup patches
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. Signed-off-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20241009-doc-mc-clean-v2-1-e637b665fa81@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent ffc8fa9 commit aeb218d

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Documentation/process/maintainer-netdev.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,8 @@ just do it. As a result, a sequence of smaller series gets merged quicker and
355355
with better review coverage. Re-posting large series also increases the mailing
356356
list traffic.
357357

358+
.. _rcs:
359+
358360
Local variable ordering ("reverse xmas tree", "RCS")
359361
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
360362

@@ -391,6 +393,21 @@ APIs and helpers, especially scoped iterators. However, direct use of
391393
``__free()`` within networking core and drivers is discouraged.
392394
Similar guidance applies to declaring variables mid-function.
393395

396+
Clean-up patches
397+
~~~~~~~~~~~~~~~~
398+
399+
Netdev discourages patches which perform simple clean-ups, which are not in
400+
the context of other work. For example:
401+
402+
* Addressing ``checkpatch.pl`` warnings
403+
* Addressing :ref:`Local variable ordering<rcs>` issues
404+
* Conversions to device-managed APIs (``devm_`` helpers)
405+
406+
This is because it is felt that the churn that such changes produce comes
407+
at a greater cost than the value of such clean-ups.
408+
409+
Conversely, spelling and grammar fixes are not discouraged.
410+
394411
Resending after review
395412
~~~~~~~~~~~~~~~~~~~~~~
396413

0 commit comments

Comments
 (0)