net: dsa: vsc73xx: Add define for max num of ports
authorPawel Dembicki <paweldembicki@gmail.com>
Wed, 17 Apr 2024 20:50:47 +0000 (22:50 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 22 Apr 2024 21:21:32 +0000 (14:21 -0700)
commit6cc5280a08899e704336446c300af2ca80da9e5f
treeb9460b475bd90584aeddc1420b81ebe8a44d3935
parent12af94b2955fa74548001624839aadce505fe957
net: dsa: vsc73xx: Add define for max num of ports

This patch introduces a new define: VSC73XX_MAX_NUM_PORTS, which can be
used in the future instead of a hardcoded value.

Currently, the only hardcoded value is vsc->ds->num_ports. It is being
replaced with the new define.

Suggested-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Link: https://lore.kernel.org/r/20240417205048.3542839-5-paweldembicki@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/vitesse-vsc73xx-core.c
drivers/net/dsa/vitesse-vsc73xx.h