linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 10/13] net: dsa: lan9303: Only allocate 3 ports
@ 2017-07-20 10:35 Egil Hjelmeland
  2017-07-24 16:54 ` Florian Fainelli
  0 siblings, 1 reply; 2+ messages in thread
From: Egil Hjelmeland @ 2017-07-20 10:35 UTC (permalink / raw)
  To: corbet, andrew, vivien.didelot, f.fainelli, davem, kernel,
	linux-doc, linux-kernel, netdev
  Cc: egil.hjelmeland

Saving 2628 bytes.

Signed-off-by: Egil Hjelmeland <egil.hjelmeland@zenitel.com>
---
 drivers/net/dsa/lan9303-core.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/dsa/lan9303-core.c b/drivers/net/dsa/lan9303-core.c
index dc95973d62ed..ad7a4c72e1fb 100644
--- a/drivers/net/dsa/lan9303-core.c
+++ b/drivers/net/dsa/lan9303-core.c
@@ -23,6 +23,8 @@
 
 #include "lan9303.h"
 
+#define LAN9303_NUM_PORTS 3
+
 /* 13.2 System Control and Status Registers
  * Multiply register number by 4 to get address offset.
  */
@@ -1361,7 +1363,7 @@ static struct dsa_switch_ops lan9303_switch_ops = {
 
 static int lan9303_register_switch(struct lan9303 *chip)
 {
-	chip->ds = dsa_switch_alloc(chip->dev, DSA_MAX_PORTS);
+	chip->ds = dsa_switch_alloc(chip->dev, LAN9303_NUM_PORTS);
 	if (!chip->ds)
 		return -ENOMEM;
 
-- 
2.11.0


DISCLAIMER:
This e-mail may contain confidential and privileged material for the sole use of the intended recipient. Any review, use, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply e-mail and delete all copies of this message.

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

* Re: [PATCH 10/13] net: dsa: lan9303: Only allocate 3 ports
  2017-07-20 10:35 [PATCH 10/13] net: dsa: lan9303: Only allocate 3 ports Egil Hjelmeland
@ 2017-07-24 16:54 ` Florian Fainelli
  0 siblings, 0 replies; 2+ messages in thread
From: Florian Fainelli @ 2017-07-24 16:54 UTC (permalink / raw)
  To: Egil Hjelmeland, corbet, andrew, vivien.didelot, davem, kernel,
	linux-doc, linux-kernel, netdev

On 07/20/2017 03:35 AM, Egil Hjelmeland wrote:
> Saving 2628 bytes.
> 
> Signed-off-by: Egil Hjelmeland <egil.hjelmeland@zenitel.com>

Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian

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

end of thread, other threads:[~2017-07-24 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-20 10:35 [PATCH 10/13] net: dsa: lan9303: Only allocate 3 ports Egil Hjelmeland
2017-07-24 16:54 ` Florian Fainelli

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