net: dsa: realtek: rtl8365mb: remove learn_limit_max private data member
The variable is just assigned the value of a macro, so it can be removed. Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
ca5ecd4246
commit
b3456030f5
@ -563,7 +563,6 @@ struct rtl8365mb_port {
|
||||
* @irq: registered IRQ or zero
|
||||
* @chip_id: chip identifier
|
||||
* @chip_ver: chip silicon revision
|
||||
* @learn_limit_max: maximum number of L2 addresses the chip can learn
|
||||
* @cpu: CPU tagging and CPU port configuration for this chip
|
||||
* @mib_lock: prevent concurrent reads of MIB counters
|
||||
* @ports: per-port data
|
||||
@ -577,7 +576,6 @@ struct rtl8365mb {
|
||||
int irq;
|
||||
u32 chip_id;
|
||||
u32 chip_ver;
|
||||
u32 learn_limit_max;
|
||||
struct rtl8365mb_cpu cpu;
|
||||
struct mutex mib_lock;
|
||||
struct rtl8365mb_port ports[RTL8365MB_MAX_NUM_PORTS];
|
||||
@ -1088,15 +1086,13 @@ static void rtl8365mb_port_stp_state_set(struct dsa_switch *ds, int port,
|
||||
static int rtl8365mb_port_set_learning(struct realtek_priv *priv, int port,
|
||||
bool enable)
|
||||
{
|
||||
struct rtl8365mb *mb = priv->chip_data;
|
||||
|
||||
/* Enable/disable learning by limiting the number of L2 addresses the
|
||||
* port can learn. Realtek documentation states that a limit of zero
|
||||
* disables learning. When enabling learning, set it to the chip's
|
||||
* maximum.
|
||||
*/
|
||||
return regmap_write(priv->map, RTL8365MB_LUT_PORT_LEARN_LIMIT_REG(port),
|
||||
enable ? mb->learn_limit_max : 0);
|
||||
enable ? RTL8365MB_LEARN_LIMIT_MAX : 0);
|
||||
}
|
||||
|
||||
static int rtl8365mb_port_set_isolation(struct realtek_priv *priv, int port,
|
||||
@ -2003,7 +1999,6 @@ static int rtl8365mb_detect(struct realtek_priv *priv)
|
||||
mb->priv = priv;
|
||||
mb->chip_id = chip_id;
|
||||
mb->chip_ver = chip_ver;
|
||||
mb->learn_limit_max = RTL8365MB_LEARN_LIMIT_MAX;
|
||||
mb->jam_table = rtl8365mb_init_jam_8365mb_vc;
|
||||
mb->jam_size = ARRAY_SIZE(rtl8365mb_init_jam_8365mb_vc);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user