Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3905783pxj; Tue, 8 Jun 2021 01:21:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRHHDSA2geEgSa8OA4Y1jY8QYEgi9jZvu+jLjME/EeWT/OLu+4HVWJM1YleHy3s4XGo20L X-Received: by 2002:a17:906:a04e:: with SMTP id bg14mr5641967ejb.366.1623140479385; Tue, 08 Jun 2021 01:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623140479; cv=none; d=google.com; s=arc-20160816; b=BNpz3zBR1f1lbvGuJOaKe+pwVOlwT0YD7/Uy7T6u5iNdqhhUjH9eXdpuWYaxttVKXK aYVA6HZLDvxR6+Nmi57/bsTo/nQcL2CVRHinCFWAp7sm/wn3YAm10uJ86UI4faLHRvTW wKrqsP172Wd0nl/PVXcWamPiaBbWHS4702HRfbXbzV++BNXYujwLjTg+6b6BSWESj69f OxjpyVibQBdvmfn2/DcEq9B46IF9N05k+e/zC018U4Nev+/0+hWc7RYEBC1N/AROZ+mM yrbywyqBNR1GwdiSoHwVNUe3Dsaimt7tClJJHUGe7E32Dh/VsbNEWiSY+HGc2yYJ7DQS lNyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=qUd2U6G3HYvKr3zFWxrouyy9wVDapA7iPoDa4a1laEw=; b=SY4G6x1XeGHO1YCk+XnjVH8V+L1R97GJwYUSZfG0lgCa+A6Tp2gwAM7DJjkEKfEPWc Fj7pHoXRYWiPUMzpmdHgGz6zSh2/ZbA9DrLikZ6i0ST+z7rUrIv6dC9BL9u0rVqM6SOl Sqhv9K9jMfLIl9VneIn/CijVcT8Zf6VAM3bWjkLy1IiJMK4GhEFnyHekj/IQNZu1UJIO VKuz1DSLUKUkUOH9peNkT4+/xtZbrRuw2TEfuoO0tXudJJTfAZxTz1SCJQMCjYd7Ebzi Ldk+NmyGmaj/c/Nc3R/AtzRffTOhGYMEBrskbZqPrNRqVZo2uHh2m93OW+v0xdEskXLS i7ng== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l5si14958862ejg.306.2021.06.08.01.20.56; Tue, 08 Jun 2021 01:21:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231517AbhFHISP (ORCPT + 99 others); Tue, 8 Jun 2021 04:18:15 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:4516 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230316AbhFHIRq (ORCPT ); Tue, 8 Jun 2021 04:17:46 -0400 Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4FzjfR2lk1zZdFN; Tue, 8 Jun 2021 16:13:03 +0800 (CST) Received: from dggemi759-chm.china.huawei.com (10.1.198.145) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2176.2; Tue, 8 Jun 2021 16:15:52 +0800 Received: from localhost.localdomain (10.67.165.24) by dggemi759-chm.china.huawei.com (10.1.198.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Tue, 8 Jun 2021 16:15:52 +0800 From: Guangbin Huang To: , , , , CC: , , , Subject: [PATCH net-next 13/16] net: farsync: remove redundant parentheses Date: Tue, 8 Jun 2021 16:12:39 +0800 Message-ID: <1623139962-34847-14-git-send-email-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1623139962-34847-1-git-send-email-huangguangbin2@huawei.com> References: <1623139962-34847-1-git-send-email-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggemi759-chm.china.huawei.com (10.1.198.145) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Peng Li Unnecessary parentheses around 'port->hwif == X21'. Signed-off-by: Peng Li Signed-off-by: Guangbin Huang --- drivers/net/wan/farsync.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wan/farsync.c b/drivers/net/wan/farsync.c index bbe87d9..f6919cf 100644 --- a/drivers/net/wan/farsync.c +++ b/drivers/net/wan/farsync.c @@ -1075,7 +1075,7 @@ fst_intr_ctlchg(struct fst_card_info *card, struct fst_port_info *port) signals = FST_RDL(card, v24DebouncedSts[port->index]); - if (signals & (((port->hwif == X21) || (port->hwif == X21D)) + if (signals & ((port->hwif == X21 || port->hwif == X21D) ? IPSTS_INDICATE : IPSTS_DCD)) { if (!netif_carrier_ok(port_to_dev(port))) { dbg(DBG_INTR, "DCD active\n"); @@ -1233,7 +1233,7 @@ fst_intr_rx(struct fst_card_info *card, struct fst_port_info *port) * FST_MIN_DMA_LEN */ - if ((len < FST_MIN_DMA_LEN) || (card->family == FST_FAMILY_TXP)) { + if (len < FST_MIN_DMA_LEN || card->family == FST_FAMILY_TXP) { memcpy_fromio(skb_put(skb, len), card->mem + BUF_OFFSET(rxBuffer[pi][rxp][0]), len); @@ -1326,8 +1326,8 @@ do_bottom_half_tx(struct fst_card_info *card) */ FST_WRW(card, txDescrRing[pi][port->txpos].bcnt, cnv_bcnt(skb->len)); - if ((skb->len < FST_MIN_DMA_LEN) || - (card->family == FST_FAMILY_TXP)) { + if (skb->len < FST_MIN_DMA_LEN || + card->family == FST_FAMILY_TXP) { /* Enqueue the packet with normal io */ memcpy_toio(card->mem + BUF_OFFSET(txBuffer[pi] @@ -2079,7 +2079,7 @@ fst_openport(struct fst_port_info *port) port->run = 1; signals = FST_RDL(port->card, v24DebouncedSts[port->index]); - if (signals & (((port->hwif == X21) || (port->hwif == X21D)) + if (signals & ((port->hwif == X21 || port->hwif == X21D) ? IPSTS_INDICATE : IPSTS_DCD)) netif_carrier_on(port_to_dev(port)); else @@ -2340,7 +2340,7 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) * */ for (i = 0; i < fst_excluded_cards; i++) { - if ((pdev->devfn) >> 3 == fst_excluded_list[i]) { + if (pdev->devfn >> 3 == fst_excluded_list[i]) { pr_info("FarSync PCI device %d not assigned\n", (pdev->devfn) >> 3); return -EBUSY; @@ -2397,8 +2397,8 @@ fst_add_one(struct pci_dev *pdev, const struct pci_device_id *ent) card->family = ((ent->driver_data == FST_TYPE_T2P) || (ent->driver_data == FST_TYPE_T4P)) ? FST_FAMILY_TXP : FST_FAMILY_TXU; - if ((ent->driver_data == FST_TYPE_T1U) || - (ent->driver_data == FST_TYPE_TE1)) + if (ent->driver_data == FST_TYPE_T1U || + ent->driver_data == FST_TYPE_TE1) card->nports = 1; else card->nports = ((ent->driver_data == FST_TYPE_T2P) || -- 2.8.1