[U-Boot] [PATCH v2 1/6] net: phy: mv88e61xx: rework to enable detection of 88E6071 devices

Joe Hershberger joe.hershberger at ni.com
Fri Jul 26 18:51:32 UTC 2019


On Fri, Jul 26, 2019 at 9:48 AM Anatolij Gustschin <agust at denx.de> wrote:
>
> On Tue, 23 Jul 2019 04:07:04 +0000
> Joe Hershberger joe.hershberger at ni.com wrote:
>
> > > >  static int mv88e61xx_phy_wait(struct phy_device *phydev)
> > > >  {
> > > > +       struct mv88e61xx_phy_priv *priv = phydev->priv;
> > > >         int val;
> > > >         u32 timeout = 100;
> > > >
> > > >         do {
> > > > -               val = mv88e61xx_reg_read(phydev, DEVADDR_GLOBAL_2,
> > > > +               val = mv88e61xx_reg_read(phydev, priv->global2,
> > >
> > > Probably just use phydev->priv->global2 instead of the local variable.
>
> No, I'll stick with local variable. priv is void*, we will get
>
> +drivers/net/phy/mv88e61xx.c:338:48: error: dereferencing 'void *' pointer [-Werror]
> +   val = mv88e61xx_reg_read(phydev, phydev->priv->global2,

Ah, ok.

-Joe


More information about the U-Boot mailing list