Commit 9bc981c3 authored by Tristram Ha's avatar Tristram Ha Committed by David S. Miller

net: dsa: microchip: clean up code

Clean up code according to patch check suggestions.
Signed-off-by: default avatarTristram Ha <Tristram.Ha@microchip.com>
Reviewed-by: default avatarWoojung Huh <Woojung.Huh@microchip.com>
Reviewed-by: default avatarPavel Machek <pavel@ucw.cz>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5b79c72e
...@@ -890,9 +890,9 @@ static void ksz_port_mdb_add(struct dsa_switch *ds, int port, ...@@ -890,9 +890,9 @@ static void ksz_port_mdb_add(struct dsa_switch *ds, int port,
if (static_table[0] & ALU_V_STATIC_VALID) { if (static_table[0] & ALU_V_STATIC_VALID) {
/* check this has same vid & mac address */ /* check this has same vid & mac address */
if (((static_table[2] >> ALU_V_FID_S) == (mdb->vid)) && if (((static_table[2] >> ALU_V_FID_S) == mdb->vid) &&
((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) && ((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) &&
(static_table[3] == mac_lo)) { static_table[3] == mac_lo) {
/* found matching one */ /* found matching one */
break; break;
} }
...@@ -963,9 +963,9 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port, ...@@ -963,9 +963,9 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port,
if (static_table[0] & ALU_V_STATIC_VALID) { if (static_table[0] & ALU_V_STATIC_VALID) {
/* check this has same vid & mac address */ /* check this has same vid & mac address */
if (((static_table[2] >> ALU_V_FID_S) == (mdb->vid)) && if (((static_table[2] >> ALU_V_FID_S) == mdb->vid) &&
((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) && ((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) &&
(static_table[3] == mac_lo)) { static_table[3] == mac_lo) {
/* found matching one */ /* found matching one */
break; break;
} }
......
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