[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160527202934.GD23212@lunn.ch>
Date: Fri, 27 May 2016 22:29:34 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Vivien Didelot <vivien.didelot@...oirfairelinux.com>
Cc: netdev <netdev@...r.kernel.org>,
Florian Fainelli <f.fainelli@...il.com>,
John Crispin <john@...ozen.org>, Bryan.Whitehead@...rochip.com
Subject: Re: [RFC PATCH 09/16] dsa: dsa: Split up creating/destroying of DSA
and CPU ports
> 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
Powered by blists - more mailing lists