Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1613496 > unrolled thread

[PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports

Started byVivien Didelot <vivien.didelot@savoirfairelinux.com>
First post2017-03-30 23:50 +0200
Last post2017-03-31 18:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports Vivien Didelot <vivien.didelot@savoirfairelinux.com> - 2017-03-30 23:50 +0200
    Re: [PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number  of ports Andrew Lunn <andrew@lunn.ch> - 2017-03-31 18:30 +0200

#1613496 — [PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports

FromVivien Didelot <vivien.didelot@savoirfairelinux.com>
Date2017-03-30 23:50 +0200
Subject[PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports
Message-ID<tqQ77-42d-17@gated-at.bofh.it>
The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch
structure. Provide the exact number of ports so the corresponding
ds->num_ports is accurate.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index fb6a723c2137..28bdfadbf050 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -4286,7 +4286,7 @@ static int mv88e6xxx_register_switch(struct mv88e6xxx_chip *chip)
 	struct device *dev = chip->dev;
 	struct dsa_switch *ds;
 
-	ds = dsa_switch_alloc(dev, DSA_MAX_PORTS);
+	ds = dsa_switch_alloc(dev, mv88e6xxx_num_ports(chip));
 	if (!ds)
 		return -ENOMEM;
 
-- 
2.12.1

[toc] | [next] | [standalone]


#1614136 — Re: [PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports

FromAndrew Lunn <andrew@lunn.ch>
Date2017-03-31 18:30 +0200
SubjectRe: [PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports
Message-ID<tr7AZ-6WK-17@gated-at.bofh.it>
In reply to#1613496
On Thu, Mar 30, 2017 at 05:37:10PM -0400, Vivien Didelot wrote:
> The current code allocates DSA_MAX_PORTS ports for a Marvell dsa_switch
> structure. Provide the exact number of ports so the corresponding
> ds->num_ports is accurate.
> 
> Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>

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

    Andrew

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web