[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210113193033.77242881@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Wed, 13 Jan 2021 19:30:33 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Vladimir Oltean <olteanv@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
alexandre.belloni@...tlin.com, andrew@...n.ch,
f.fainelli@...il.com, vivien.didelot@...il.com,
alexandru.marginean@....com, claudiu.manoil@....com,
xiaoliang.yang_1@....com, hongbo.wang@....com, jiri@...nulli.us,
idosch@...sch.org, UNGLinuxDriver@...rochip.com
Subject: Re: [PATCH v4 net-next 08/10] net: mscc: ocelot: register devlink
ports
On Mon, 11 Jan 2021 19:43:14 +0200 Vladimir Oltean wrote:
> +struct ocelot_devlink_private {
> + struct ocelot *ocelot;
> +};
I don't think you ever explained to me why you don't put struct ocelot
in the priv.
- ocelot = devm_kzalloc(&pdev->dev, sizeof(*ocelot), GFP_KERNEL);
- if (!ocelot)
+ devlink = devlink_alloc(&ocelot_devlink_ops, sizeof(*ocelot));
+ if (!devlink)
return -ENOMEM;
+ ocelot = devlink_priv(ocelot->devlink);
Powered by blists - more mailing lists