[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aea64441-9e8b-4a1d-bd7e-cd09148451dc@lunn.ch>
Date: Wed, 14 Jan 2026 14:53:40 +0100
From: Andrew Lunn <andrew@...n.ch>
To: David Yang <mmyangfl@...il.com>
Cc: netdev@...r.kernel.org, Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next v5 2/2] net: dsa: yt921x: Use u64_stats_t for
MIB stats
> @@ -690,7 +689,7 @@ static int yt921x_read_mib(struct yt921x_priv *priv, int port)
> break;
>
> if (desc->size <= 1) {
> - u64 old_val = *valp;
> + u64 old_val = u64_stats_read(&((u64_stats_t *)mib)[i]);
You do seem to like using casts, despite review comments saying they
should be avoided. Look at other users of u64_stats_read(). How many
have casts? Please see if you can get the types correct so this cast
is not needed.
> - if (res)
> + if (res) {
> dev_err(dev, "Failed to %s port %d: %i\n", "read stats for",
> port, res);
> - return res;
> + return res;
> + }
This is logically a different change. Please put it into a patch of
its own. You want lots of small patches, with good commit messages,
which are obviously correct.
Andrew
---
pw-bot: cr
Powered by blists - more mailing lists