Thread (90 messages) flat view 90 messages, 9 authors, 2021-12-31

Re: [PATCH net-next v2 06/13] net: dsa: realtek: use phy_read in ds->ops

From: Luiz Angelo Daros de Luca <luizluca@gmail.com>
Date: 2021-12-31 02:30:34

quoted
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help