Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-10 Thread Andrew Lunn
On Mon, Apr 10, 2017 at 09:44:12AM +0200, Juergen Borleis wrote: > Hi Andrew, > > On Friday 07 April 2017 16:29:43 Andrew Lunn wrote: > > > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum) > > > +{ > > > + int ret; > > > + u32 val; > > > + > > > + if (regnum > MII_EXPANSION)

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-10 Thread Juergen Borleis
Hi Andrew, On Friday 07 April 2017 16:29:43 Andrew Lunn wrote: > > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum) > > +{ > > + int ret; > > + u32 val; > > + > > + if (regnum > MII_EXPANSION) { > > + if (regnum == MII_LAN911X_SPECIAL_CONTROL_STATUS) > > +

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-07 Thread Andrew Lunn
Hi Juergen > +static int lan9303_virt_phy_reg_read(struct lan9303 *chip, int regnum) > +{ > + int ret; > + u32 val; > + > + if (regnum > MII_EXPANSION) { > + if (regnum == MII_LAN911X_SPECIAL_CONTROL_STATUS) > + regnum = 7; /* map to LAN9303_VIRT_SPECIAL

Re: [PATCH v2 2/4] net: dsa: add new DSA switch driver for the SMSC-LAN9303

2017-04-07 Thread David Miller
From: Juergen Borleis Date: Fri, 7 Apr 2017 10:15:00 +0200 > +static inline struct lan9303 *ds_to_lan9303(struct dsa_switch *ds) > +{ > + return (struct lan9303 *)ds->priv; > +} You never need an explicit cast from a void pointer to another kind of pointer. Please remove this. In fact, th