[PATCH net-next] net: thunderx: Unembed netdev structure
Breno Leitao
leitao at debian.org
Wed Jun 26 08:12:51 PDT 2024
On Tue, Jun 25, 2024 at 05:54:34PM -0700, Jakub Kicinski wrote:
> On Mon, 24 Jun 2024 03:29:18 -0700 Breno Leitao wrote:
> > static void bgx_lmac_handler(struct net_device *netdev)
> > {
> > - struct lmac *lmac = container_of(netdev, struct lmac, netdev);
> > + struct lmac *lmac = netdev_priv(netdev);
>
> I think you are storing a pointer to lmac, so:
>
> struct lmac **priv = netdev_priv(netdev);
> struct lmac *lmac = *priv;
Good catch. you are absolutely correct. I will update.
More information about the linux-arm-kernel
mailing list