diff mbox series

[net-next,5/5] net: dsa: loop: Set correct number of ports

Message ID 20200803200354.45062-6-f.fainelli@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series net: dsa: loop: Preparatory changes for | expand

Commit Message

Florian Fainelli Aug. 3, 2020, 8:03 p.m. UTC
We only support DSA_LOOP_NUM_PORTS in the switch, do not tell the DSA
core to allocate up to DSA_MAX_PORTS which is nearly the double (6 vs.
11).

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/dsa/dsa_loop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn Aug. 3, 2020, 8:29 p.m. UTC | #1
On Mon, Aug 03, 2020 at 01:03:54PM -0700, Florian Fainelli wrote:
> We only support DSA_LOOP_NUM_PORTS in the switch, do not tell the DSA
> core to allocate up to DSA_MAX_PORTS which is nearly the double (6 vs.
> 11).
> 
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
diff mbox series

Patch

diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c
index 6a7d661b5a59..eb600b3dbf26 100644
--- a/drivers/net/dsa/dsa_loop.c
+++ b/drivers/net/dsa/dsa_loop.c
@@ -275,7 +275,7 @@  static int dsa_loop_drv_probe(struct mdio_device *mdiodev)
 		return -ENOMEM;
 
 	ds->dev = &mdiodev->dev;
-	ds->num_ports = DSA_MAX_PORTS;
+	ds->num_ports = DSA_LOOP_NUM_PORTS;
 
 	ps = devm_kzalloc(&mdiodev->dev, sizeof(*ps), GFP_KERNEL);
 	if (!ps)