[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJq09z4EXZZ_G=9+rZXip_duw4yRiYmeXi2UZ_c63ObV8d+KfA@mail.gmail.com>
Date: Thu, 30 Dec 2021 23:30:20 -0300
From: Luiz Angelo Daros de Luca <luizluca@...il.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: Florian Fainelli <f.fainelli@...il.com>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
Linus Walleij <linus.walleij@...aro.org>,
Vivien Didelot <vivien.didelot@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
Alvin Šipraga <alsi@...g-olufsen.dk>,
Arınç ÜNAL <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next v2 06/13] net: dsa: realtek: use phy_read in ds->ops
> > Apologize for my poor C experience but I didn't understand your
> > suggestion. Simply removing the cast will not work because bus->priv
> > is void*
>
> You can do
>
> struct realtek_priv *priv = bus->priv;
> struct dsa_switch *ds = priv->ds;
>
> This is more readable than what you suggested, and avoids the cast.
>
> Andrew
>
Got it! Thanks Andrew.
Powered by blists - more mailing lists