RE: [EXTERNAL] Re: [net-next PATCH v4 03/10] octeontx2-pf: Create representor netdev

From: Geethasowjanya Akula
Date: Mon May 13 2024 - 06:36:17 EST




> -----Original Message-----
> From: Jakub Kicinski <kuba@xxxxxxxxxx>
> Sent: Friday, May 10, 2024 8:58 AM
> To: Geethasowjanya Akula <gakula@xxxxxxxxxxx>
> Cc: netdev@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> davem@xxxxxxxxxxxxx; pabeni@xxxxxxxxxx; edumazet@xxxxxxxxxx; Sunil
> Kovvuri Goutham <sgoutham@xxxxxxxxxxx>; Subbaraya Sundeep Bhatta
> <sbhatta@xxxxxxxxxxx>; Hariprasad Kelam <hkelam@xxxxxxxxxxx>
> Subject: [EXTERNAL] Re: [net-next PATCH v4 03/10] octeontx2-pf: Create
> representor netdev>
> ----------------------------------------------------------------------
> On Tue, 7 May 2024 22:09:14 +0530 Geetha sowjanya wrote:
> > + priv->reps = devm_kcalloc(priv->dev, rep_cnt, sizeof(struct rep_dev *),
> > + GFP_KERNEL);
> > + if (!priv->reps)
> > + return -ENOMEM;
>
> using devm_ here is pointless, the objects are not tied to the lifetime of the
> device (there can be created multiple times) and you have to unregister the
> netdevs manually, anyway.
Will fix it next version.