net: mscc: ocelot: fix ineffective WARN_ON() in ocelot_stats.c
authorVladimir Oltean <vladimir.oltean@nxp.com>
Wed, 12 Apr 2023 12:47:37 +0000 (15:47 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 14 Apr 2023 04:56:06 +0000 (21:56 -0700)
commita291399e635415295860765954e247e83445e291
tree0a596c9910caf11b53800be3d909326d28b23139
parent6663c01eca1a250374a898f19b60ec01859a3d0b
net: mscc: ocelot: fix ineffective WARN_ON() in ocelot_stats.c

Since it is hopefully now clear that, since "last" and "layout[i].reg"
are enum types and not addresses, the existing WARN_ON() is ineffective
in checking that the _addresses_ are sorted in the proper order.

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>
drivers/net/ethernet/mscc/ocelot_stats.c