diff options
author | Jakub Kicinski <kuba@kernel.org> | 2022-07-01 20:12:08 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-07-04 10:06:50 +0100 |
commit | a24875641143fce726529e6d550b313c53eb5821 (patch) | |
tree | be49df26bb80d82f5eb0ada52cdd05b0d1ef92cb /Documentation/process | |
parent | 02514a067fad6df27c4b21c316c1af93066af06e (diff) |
docs: netdev: document reverse xmas tree
Similarly to the 15 patch rule the reverse xmas tree is not
documented.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation/process')
-rw-r--r-- | Documentation/process/maintainer-netdev.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Documentation/process/maintainer-netdev.rst b/Documentation/process/maintainer-netdev.rst index 79a10d05031e..8a9dae7a0524 100644 --- a/Documentation/process/maintainer-netdev.rst +++ b/Documentation/process/maintainer-netdev.rst @@ -197,6 +197,19 @@ it is requested that you make it look like this:: * another line of text */ +What is "reverse xmas tree"? +---------------------------- + +Netdev has a convention for ordering local variables in functions. +Order the variable declaration lines longest to shortest, e.g.:: + + struct scatterlist *sg; + struct sk_buff *skb; + int err, i; + +If there are dependencies between the variables preventing the ordering +move the initialization out of line. + I am working in existing code which uses non-standard formatting. Which formatting should I use? ------------------------------------------------------------------------------------------------ Make your code follow the most recent guidelines, so that eventually all code |