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 6/8] net: mscc: ocelot: strengthen type of "u32 reg" and "u32 base" in ocelot_stats.c
Date: Wed, 12 Apr 2023 14:19:29 -0700 [thread overview]
Message-ID: <003aa645-187e-f0d7-fe69-fe86a3d7226d@intel.com> (raw)
In-Reply-To: <20230412124737.2243527-7-vladimir.oltean@nxp.com>
On 4/12/2023 5:47 AM, Vladimir Oltean wrote:
> Use the specific enum ocelot_reg to make it clear that the region
> registers are encoded and not plain addresses.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> ---
> drivers/net/ethernet/mscc/ocelot_stats.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/mscc/ocelot_stats.c b/drivers/net/ethernet/mscc/ocelot_stats.c
> index 99a14a942600..a381e326cb2b 100644
> --- a/drivers/net/ethernet/mscc/ocelot_stats.c
> +++ b/drivers/net/ethernet/mscc/ocelot_stats.c
> @@ -145,7 +145,7 @@ enum ocelot_stat {
> };
>
> struct ocelot_stat_layout {
> - u32 reg;
> + enum ocelot_reg reg;
> char name[ETH_GSTRING_LEN];
> };
>
> @@ -257,7 +257,7 @@ struct ocelot_stat_layout {
>
> struct ocelot_stats_region {
> struct list_head node;
> - u32 base;
> + enum ocelot_reg base;
> enum ocelot_stat first_stat;
> int count;
> u32 *buf;
> @@ -889,7 +889,7 @@ static int ocelot_prepare_stats_regions(struct ocelot *ocelot)
> {
> struct ocelot_stats_region *region = NULL;
> const struct ocelot_stat_layout *layout;
> - unsigned int last = 0;
> + enum ocelot_reg last = 0;
> int i;
>
> INIT_LIST_HEAD(&ocelot->stats_regions);
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
next prev parent reply other threads:[~2023-04-12 21:20 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 [this message]
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
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=003aa645-187e-f0d7-fe69-fe86a3d7226d@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
all inboxes | Powered by JetHome®