diff options
author | Michael Grzeschik <m.grzeschik@pengutronix.de> | 2020-12-01 21:45:00 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2020-12-02 17:16:29 -0800 |
commit | 65fe1acf07d76198c77a9c9a672928c539bcbc72 (patch) | |
tree | b647a1a6856955165ae967f8cf5325567bd5e901 /scripts/bpf_helpers_doc.py | |
parent | 31b62c78c1645e829a08453458224f832ac1ac7b (diff) | |
download | linux-65fe1acf07d76198c77a9c9a672928c539bcbc72.tar.gz linux-65fe1acf07d76198c77a9c9a672928c539bcbc72.tar.bz2 linux-65fe1acf07d76198c77a9c9a672928c539bcbc72.zip |
net: dsa: microchip: ksz8795: use mib_cnt where possible
The variable mib_cnt is assigned with TOTAL_SWITCH_COUNTER_NUM. This
value can also be derived from the array size of mib_names. This patch
uses this calculated value instead, removes the extra define and uses
mib_cnt everywhere possible instead of the static define
TOTAL_SWITCH_COUNTER_NUM. Keeping it in a separate variable instead of
using ARRAY_SIZE everywhere instead makes the driver more flexible for
future use of devices with different amount of counters.
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions