diff options
author | Tristram Ha <Tristram.Ha@microchip.com> | 2018-11-20 18:55:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-20 23:57:12 -0500 |
commit | 9bc981c35530c136e61934f682dfef765fadcb5a (patch) | |
tree | 62588aab603acf73efbb9f38c4aa166795d06d78 /drivers/net/dsa/microchip/ksz_common.c | |
parent | 5b79c72e965a21da08f1e498649d514cdb82712e (diff) |
net: dsa: microchip: clean up code
Clean up code according to patch check suggestions.
Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com>
Reviewed-by: Woojung Huh <Woojung.Huh@microchip.com>
Reviewed-by: Pavel Machek <pavel@ucw.cz>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index d47d03b2623b..eb833dfeb26c 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c | |||
@@ -890,9 +890,9 @@ static void ksz_port_mdb_add(struct dsa_switch *ds, int port, | |||
890 | 890 | ||
891 | if (static_table[0] & ALU_V_STATIC_VALID) { | 891 | if (static_table[0] & ALU_V_STATIC_VALID) { |
892 | /* check this has same vid & mac address */ | 892 | /* check this has same vid & mac address */ |
893 | if (((static_table[2] >> ALU_V_FID_S) == (mdb->vid)) && | 893 | if (((static_table[2] >> ALU_V_FID_S) == mdb->vid) && |
894 | ((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) && | 894 | ((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) && |
895 | (static_table[3] == mac_lo)) { | 895 | static_table[3] == mac_lo) { |
896 | /* found matching one */ | 896 | /* found matching one */ |
897 | break; | 897 | break; |
898 | } | 898 | } |
@@ -963,9 +963,9 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port, | |||
963 | if (static_table[0] & ALU_V_STATIC_VALID) { | 963 | if (static_table[0] & ALU_V_STATIC_VALID) { |
964 | /* check this has same vid & mac address */ | 964 | /* check this has same vid & mac address */ |
965 | 965 | ||
966 | if (((static_table[2] >> ALU_V_FID_S) == (mdb->vid)) && | 966 | if (((static_table[2] >> ALU_V_FID_S) == mdb->vid) && |
967 | ((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) && | 967 | ((static_table[2] & ALU_V_MAC_ADDR_HI) == mac_hi) && |
968 | (static_table[3] == mac_lo)) { | 968 | static_table[3] == mac_lo) { |
969 | /* found matching one */ | 969 | /* found matching one */ |
970 | break; | 970 | break; |
971 | } | 971 | } |