[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Znwv8y03Ftzu0LP8@gmail.com>
Date: Wed, 26 Jun 2024 08:12:51 -0700
From: Breno Leitao <leitao@...ian.org>
To: Jakub Kicinski <kuba@...nel.org>
Cc: Sunil Goutham <sgoutham@...vell.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
horms@...nel.org,
"moderated list:ARM/CAVIUM THUNDER NETWORK DRIVER" <linux-arm-kernel@...ts.infradead.org>,
"open list:NETWORKING DRIVERS" <netdev@...r.kernel.org>,
open list <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: thunderx: Unembed netdev structure
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.
Powered by blists - more mailing lists