[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240702105411.GF598357@kernel.org>
Date: Tue, 2 Jul 2024 11:54:11 +0100
From: Simon Horman <horms@...nel.org>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org, thomas.petazzoni@...tlin.com,
Andrew Lunn <andrew@...n.ch>, Jakub Kicinski <kuba@...nel.org>,
Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>,
linux-arm-kernel@...ts.infradead.org,
Christophe Leroy <christophe.leroy@...roup.eu>,
Herve Codina <herve.codina@...tlin.com>,
Florian Fainelli <f.fainelli@...il.com>,
Heiner Kallweit <hkallweit1@...il.com>,
Vladimir Oltean <vladimir.oltean@....com>,
Köry Maincent <kory.maincent@...tlin.com>,
Jesse Brandeburg <jesse.brandeburg@...el.com>,
Marek Behún <kabel@...nel.org>,
Piergiorgio Beruto <piergiorgio.beruto@...il.com>,
Oleksij Rempel <o.rempel@...gutronix.de>,
Nicolò Veronese <nicveronese@...il.com>,
mwojtas@...omium.org, Nathan Chancellor <nathan@...nel.org>,
Antoine Tenart <atenart@...nel.org>,
Marc Kleine-Budde <mkl@...gutronix.de>
Subject: Re: [PATCH net-next v14 12/13] net: ethtool: strset: Allow querying
phy stats by index
On Mon, Jul 01, 2024 at 03:17:58PM +0200, Maxime Chevallier wrote:
> The ETH_SS_PHY_STATS command gets PHY statistics. Use the phydev pointer
> from the ethnl request to allow query phy stats from each PHY on the
> link.
>
> Signed-off-by: Maxime Chevallier <maxime.chevallier@...tlin.com>
> ---
> net/ethtool/strset.c | 24 +++++++++++++++++-------
> 1 file changed, 17 insertions(+), 7 deletions(-)
>
> diff --git a/net/ethtool/strset.c b/net/ethtool/strset.c
...
> @@ -279,6 +280,8 @@ static int strset_prepare_data(const struct ethnl_req_info *req_base,
> const struct strset_req_info *req_info = STRSET_REQINFO(req_base);
> struct strset_reply_data *data = STRSET_REPDATA(reply_base);
> struct net_device *dev = reply_base->dev;
> + struct nlattr **tb = info->attrs;
Hi Maxime,
Elsewhere in this function it is assumed that info may be NULL.
But here it is dereferenced unconditionally.
Flagged by Smatch.
> + struct phy_device *phydev;
> unsigned int i;
> int ret;
>
...
Powered by blists - more mailing lists