From: Jacob Keller <jacob.e.keller@intel.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, <netdev@vger.kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"Claudiu Manoil" <claudiu.manoil@nxp.com>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
<UNGLinuxDriver@microchip.com>,
Colin Foster <colin.foster@in-advantage.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next 7/8] net: mscc: ocelot: strengthen type of "int i" in ocelot_stats.c
Date: Wed, 12 Apr 2023 14:21:33 -0700 [thread overview]
Message-ID: <794f4bb2-ea10-1d9b-96a2-e14df75c81df@intel.com> (raw)
In-Reply-To: <20230412124737.2243527-8-vladimir.oltean@nxp.com>
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@nxp.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@intel.com>
next prev parent reply other threads:[~2023-04-12 21:22 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-12 12:47 [PATCH net-next 0/8] Ocelot/Felix driver cleanup Vladimir Oltean
2023-04-12 12:47 ` [PATCH net-next 1/8] net: mscc: ocelot: strengthen type of "u32 reg" in I/O accessors Vladimir Oltean
2023-04-12 21:11 ` Jacob Keller
2023-04-12 12:47 ` [PATCH net-next 2/8] net: mscc: ocelot: refactor enum ocelot_reg decoding to helper Vladimir Oltean
2023-04-12 21:16 ` Jacob Keller
2023-04-12 12:47 ` [PATCH net-next 3/8] net: mscc: ocelot: debugging print for statistics regions Vladimir Oltean
2023-04-12 21:17 ` Jacob Keller
2023-04-12 12:47 ` [PATCH net-next 4/8] net: mscc: ocelot: remove blank line at the end of ocelot_stats.c Vladimir Oltean
2023-04-12 15:59 ` Colin Foster
2023-04-12 21:18 ` Jacob Keller
2023-04-12 12:47 ` [PATCH net-next 5/8] net: dsa: felix: remove confusing/incorrect comment from felix_setup() Vladimir Oltean
2023-04-12 21:18 ` Jacob Keller
2023-04-12 12:47 ` [PATCH net-next 6/8] net: mscc: ocelot: strengthen type of "u32 reg" and "u32 base" in ocelot_stats.c Vladimir Oltean
2023-04-12 21:19 ` Jacob Keller
2023-04-12 12:47 ` [PATCH net-next 7/8] net: mscc: ocelot: strengthen type of "int i" " Vladimir Oltean
2023-04-12 21:21 ` Jacob Keller [this message]
2023-04-12 12:47 ` [PATCH net-next 8/8] net: mscc: ocelot: fix ineffective WARN_ON() " Vladimir Oltean
2023-04-12 21:23 ` Jacob Keller
2023-04-13 0:45 ` [PATCH net-next 0/8] Ocelot/Felix driver cleanup Colin Foster
2023-04-13 10:08 ` Vladimir Oltean
2023-04-14 5:20 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=794f4bb2-ea10-1d9b-96a2-e14df75c81df@intel.com \
--to=jacob.e.keller@intel.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andrew@lunn.ch \
--cc=claudiu.manoil@nxp.com \
--cc=colin.foster@in-advantage.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox