Commit eae0b9d1 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski

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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarJacob Keller <jacob.e.keller@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent a9afc3e4
...@@ -145,7 +145,7 @@ enum ocelot_stat { ...@@ -145,7 +145,7 @@ enum ocelot_stat {
}; };
struct ocelot_stat_layout { struct ocelot_stat_layout {
u32 reg; enum ocelot_reg reg;
char name[ETH_GSTRING_LEN]; char name[ETH_GSTRING_LEN];
}; };
...@@ -257,7 +257,7 @@ struct ocelot_stat_layout { ...@@ -257,7 +257,7 @@ struct ocelot_stat_layout {
struct ocelot_stats_region { struct ocelot_stats_region {
struct list_head node; struct list_head node;
u32 base; enum ocelot_reg base;
enum ocelot_stat first_stat; enum ocelot_stat first_stat;
int count; int count;
u32 *buf; u32 *buf;
...@@ -889,7 +889,7 @@ static int ocelot_prepare_stats_regions(struct ocelot *ocelot) ...@@ -889,7 +889,7 @@ static int ocelot_prepare_stats_regions(struct ocelot *ocelot)
{ {
struct ocelot_stats_region *region = NULL; struct ocelot_stats_region *region = NULL;
const struct ocelot_stat_layout *layout; const struct ocelot_stat_layout *layout;
unsigned int last = 0; enum ocelot_reg last = 0;
int i; int i;
INIT_LIST_HEAD(&ocelot->stats_regions); INIT_LIST_HEAD(&ocelot->stats_regions);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment