From mboxrd@z Thu Jan 1 00:00:00 1970 From: Subject: [PATCH v2 net-next 2/8] net: dsa: microchip: Clean up code according to patch check suggestions Date: Tue, 5 Dec 2017 17:46:32 -0800 Message-ID: <1512524798-16210-3-git-send-email-Tristram.Ha@microchip.com> References: <1512524798-16210-1-git-send-email-Tristram.Ha@microchip.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Tristram Ha , Arkadi Sharshevsky , , To: Andrew Lunn , Florian Fainelli , Pavel Machek , Ruediger Schmitt Return-path: Received: from esa5.microchip.iphmx.com ([216.71.150.166]:14514 "EHLO esa5.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754092AbdLFBqz (ORCPT ); Tue, 5 Dec 2017 20:46:55 -0500 In-Reply-To: <1512524798-16210-1-git-send-email-Tristram.Ha@microchip.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Tristram Ha Clean up code according to patch check suggestions. Signed-off-by: Tristram Ha Reviewed-by: Woojung Huh Reviewed-by: Pavel Machek Reviewed-by: Florian Fainelli Reviewed-by: Andrew Lunn --- drivers/net/dsa/microchip/ksz_common.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index d662a9a..435c463 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -895,9 +895,9 @@ static void ksz_port_mdb_add(struct dsa_switch *ds, int port, if (static_table[0] & ALU_V_STATIC_VALID) { /* 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[3] == mac_lo)) { + static_table[3] == mac_lo) { /* found matching one */ break; } @@ -968,9 +968,9 @@ static int ksz_port_mdb_del(struct dsa_switch *ds, int port, if (static_table[0] & ALU_V_STATIC_VALID) { /* 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[3] == mac_lo)) { + static_table[3] == mac_lo) { /* found matching one */ break; } -- 1.9.1