Messages in this thread | | | Date | Tue, 20 Oct 2020 11:18:51 +0100 | From | Russell King - ARM Linux admin <> | Subject | Re: [PATCH v3 3/3] net: dsa: mv88e6xxx: Support serdes ports on MV88E6123/6131 |
| |
On Tue, Oct 20, 2020 at 04:45:58PM +1300, Chris Packham wrote: > +void mv88e6123_serdes_get_regs(struct mv88e6xxx_chip *chip, int port, void *_p) > +{ > + u16 *p = _p; > + u16 reg; > + int i; > + > + if (mv88e6xxx_serdes_get_lane(chip, port) == 0) > + return; > + > + for (i = 0; i < 26; i++) { > + mv88e6xxx_phy_read(chip, port, i, ®);
Shouldn't this deal with a failed read in some way, rather than just assigning the last or possibly uninitialised value to p[i] ?
-- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
| |