[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <794f4bb2-ea10-1d9b-96a2-e14df75c81df@intel.com>
Date: Wed, 12 Apr 2023 14:21:33 -0700
From: Jacob Keller <jacob.e.keller@...el.com>
To: Vladimir Oltean <vladimir.oltean@....com>, <netdev@...r.kernel.org>
CC: Andrew Lunn <andrew@...n.ch>,
Florian Fainelli <f.fainelli@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
"Claudiu Manoil" <claudiu.manoil@....com>,
Alexandre Belloni <alexandre.belloni@...tlin.com>,
<UNGLinuxDriver@...rochip.com>,
Colin Foster <colin.foster@...advantage.com>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next 7/8] net: mscc: ocelot: strengthen type of "int
i" in ocelot_stats.c
On 4/12/2023 5:47 AM, Vladimir Oltean wrote:
> The "int i" used to index the struct ocelot_stat_layout array actually
> has a specific type: enum ocelot_stat. Use it, so that the WARN()
> comment from ocelot_prepare_stats_regions() makes more sense.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
> ---
> drivers/net/ethernet/mscc/ocelot_stats.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
>
For the lazy readers who didn't dig up the source outside the patch
context, the WARN in question is:
>
> /* enum ocelot_stat must be kept sorted in the same
> * order as layout[i].reg in order to have efficient
> * bulking
> */
> WARN_ON(last >= layout[i].reg);
Reviewed-by: Jacob Keller <jacob.e.keller@...el.com>
Powered by blists - more mailing lists