From patchwork Fri Oct 6 20:33:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristram.Ha@microchip.com X-Patchwork-Id: 822719 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3y81fY5tY2z9t34 for ; Sat, 7 Oct 2017 07:37:41 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752875AbdJFUh2 (ORCPT ); Fri, 6 Oct 2017 16:37:28 -0400 Received: from esa3.microchip.iphmx.com ([68.232.153.233]:5540 "EHLO esa3.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752626AbdJFUdI (ORCPT ); Fri, 6 Oct 2017 16:33:08 -0400 X-IronPort-AV: E=Sophos;i="5.42,484,1500966000"; d="scan'208";a="7727752" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa3.microchip.iphmx.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 06 Oct 2017 13:33:08 -0700 Received: from localhost.localdomain (10.10.76.4) by chn-sv-exch07.mchp-main.com (10.10.76.108) with Microsoft SMTP Server id 14.3.352.0; Fri, 6 Oct 2017 13:33:07 -0700 From: To: Andrew Lunn , Florian Fainelli , Pavel Machek , Ruediger Schmitt CC: Tristram Ha , , , , , , Subject: [PATCH v1 RFC 2/7] Clean up code according to patch check suggestions Date: Fri, 6 Oct 2017 13:33:00 -0700 Message-ID: <1507321985-15097-3-git-send-email-Tristram.Ha@microchip.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1507321985-15097-1-git-send-email-Tristram.Ha@microchip.com> References: <1507321985-15097-1-git-send-email-Tristram.Ha@microchip.com> MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org From: Tristram Ha Clean up code according to patch check suggestions. Signed-off-by: Tristram Ha 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 685dafd..d72aad7 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c @@ -898,9 +898,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; } @@ -971,9 +971,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; }