[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250310131413.505e676f@kmaincent-XPS-13-7390>
Date: Mon, 10 Mar 2025 13:14:13 +0100
From: Kory Maincent <kory.maincent@...tlin.com>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, Andrew Lunn <andrew@...n.ch>, Jakub Kicinski
<kuba@...nel.org>, Eric Dumazet <edumazet@...gle.com>, Paolo Abeni
<pabeni@...hat.com>, Heiner Kallweit <hkallweit1@...il.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com, linux-arm-kernel@...ts.infradead.org,
Christophe Leroy <christophe.leroy@...roup.eu>, Herve Codina
<herve.codina@...tlin.com>, Florian Fainelli <f.fainelli@...il.com>,
Russell King <linux@...linux.org.uk>, Vladimir Oltean
<vladimir.oltean@....com>, Oleksij Rempel <o.rempel@...gutronix.de>, Simon
Horman <horms@...nel.org>, Romain Gantois <romain.gantois@...tlin.com>,
Piergiorgio Beruto <piergiorgio.beruto@...il.com>, Stanislav Fomichev
<sdf@...ichev.me>
Subject: Re: [PATCH net-next v2 5/7] net: ethtool: phy: Convert the PHY_GET
command to generic phy dump
On Sat, 8 Mar 2025 16:54:37 +0100
Maxime Chevallier <maxime.chevallier@...tlin.com> wrote:
> Now that we have an infrastructure in ethnl for perphy DUMPs, we can get
> rid of the custom ->doit and ->dumpit to deal with PHY listing commands.
>
> As most of the code was custom, this basically means re-writing how we
> deal with PHY listing.
Only nitpick ;)
> -static int
> -ethnl_phy_fill_reply(const struct ethnl_req_info *req_base, struct sk_buff
> *skb) +static int phy_prepare_data(const struct ethnl_req_info *req_info,
> + struct ethnl_reply_data *reply_data,
> + const struct genl_info *info)
> {
> - struct phy_req_info *req_info = PHY_REQINFO(req_base);
> - struct phy_device_node *pdn = req_info->pdn;
> - struct phy_device *phydev = pdn->phy;
> - enum phy_upstream ptype;
> + struct phy_reply_data *rep_data = PHY_REPDATA(reply_data);
> + struct phy_link_topology *topo = reply_data->dev->link_topo;
> + struct nlattr **tb = info->attrs;
> + struct phy_device_node *pdn;
> + struct phy_device *phydev;
Reverse xmas tree.
> - ptype = pdn->upstream_type;
> + /* RTNL is held by th caller */
Small typo here *the*.
The rest is good for me.
Regards,
--
Köry Maincent, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
Powered by blists - more mailing lists