diff options
author | Vladimir Oltean <vladimir.oltean@nxp.com> | 2023-04-12 14:47:35 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2023-04-14 06:56:06 +0200 |
commit | eae0b9d15ba6050852180449b932996bc3add48e (patch) | |
tree | aa1765e1c3a7342f0d6e7a487c03dc29688085d6 /drivers/net/ethernet/mscc | |
parent | net: dsa: felix: remove confusing/incorrect comment from felix_setup() (diff) | |
download | linux-eae0b9d15ba6050852180449b932996bc3add48e.tar.xz linux-eae0b9d15ba6050852180449b932996bc3add48e.zip |
net: mscc: ocelot: strengthen type of "u32 reg" and "u32 base" in ocelot_stats.c
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>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/mscc')
-rw-r--r-- | drivers/net/ethernet/mscc/ocelot_stats.c | 6 |
1 files 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); |