quoted
static int realtek_smi_mdio_read(struct mii_bus *bus, int addr, int regnum)
{
- struct realtek_priv *priv = bus->priv;
+ struct dsa_switch *ds = ((struct realtek_priv *)bus->priv)->ds;
No need to cast a void pointer, this applies throughout the entire patch
series.
--
Hi Florian,
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* and it needs to know it is realtek_priv in order to
indirectly reference ds. Should I keep the local priv variable instead
of removing it (this way, cast is not needed)?
Luiz