Thread (37 messages) flat view 37 messages, 4 authors, 2016-05-28

Re: [RFC PATCH 09/16] dsa: dsa: Split up creating/destroying of DSA and CPU ports

From: Andrew Lunn <andrew@lunn.ch>
Date: 2016-05-27 20:29:36

dsa_cpu_dsa_setups is not really meaningful and doesn't add much
value.
I would disagree.  Quoting Documentation/CodingStyle

                Chapter 6: Functions

Functions should be short and sweet, and do just one thing.  They should
fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24,
as we all know), and do one thing and do that well.

dsa_cpu_dsa_setups iterates the ports and find the dsa and cpu ports
that need setting up.

dsa_cpu_dsa_setup() does the actual setup.

These are completely different things, and so should be in different
functions.

	Andrew
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help