Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1613496
| From | Vivien Didelot <vivien.didelot@savoirfairelinux.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH net-next v2 4/9] net: dsa: mv88e6xxx: allocate the number of ports |
| Date | 2017-03-30 23:50 +0200 |
| Message-ID | <tqQ77-42d-17@gated-at.bofh.it> (permalink) |
| References | <tqQ77-42d-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[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
csiph-web