Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp264717pxx; Thu, 29 Oct 2020 01:57:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwk8hm6yh0S2elzRB6S1tkkU6YPg5VCyLu6sQNmBB+MDxGSMhrztqW1LJKemVTNESUCtP1F X-Received: by 2002:aa7:c351:: with SMTP id j17mr2859550edr.70.1603961853361; Thu, 29 Oct 2020 01:57:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603961853; cv=none; d=google.com; s=arc-20160816; b=iNgEdhZF86wMLsNu36Axw8IYOKuIo0FE3HnhviqhwrfZuOI6mDVQhrPHyoqE4ulGpF ZkUr5j0OSky0sQpLaxHx998TLqVVv1YlzGlBeNGzXfy5epiEZ57HD2ayHbovCRzmMhA3 lFFkBSnBsDmcpLAKRI9tlQ3xNHwQdEz2hkhV5tdXG8xNKLYP3EZJOY2g667VJ1vGsn1X fal9gcgqR3kFaQ7D4/CBda0KJyeToPcBrTma1ncuxARl97kmr5Ik5JUlGJNC3wwHh1ZR UIJvGYIFtwKwRcqsIG8xEOIszoNjfzxTCUGGD5RMjdMsk/Ap8PuvCWcHVcDxQXN1kvVB ZIlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=vw6wddNVOkrBbIFHedyZ8DirL/+vFftuXP+7MTQex6k=; b=1G1B5YGD4pQ48c+YFPHCFUyVCn0QtEcH75FkTRb7atBLbeEz5NkIQZLclaValuztpG 5EFcVnZq5E50nC5ZpVDevY+MA4POrZ8w2tXS2p+F7D+J87orhHI2DpZqVFB0GRjLi0sR R1hQvCkBaSq1Etfruzh9Y7yZ6HvWwL/fbV0GJI7waeSjT3q9nl041pYUNedBFGffEdwf NYQIdyAc311RARvA44eC1F26f1SrzrDK4sJDU4pavJ0ZbQhLiEwPef+nX4lsJr5Dofbc FcECH581iBqVmwJWda3v3msKIDES013JtAz3F9lhNWyrna4UxmSpDPq9A4cjHwoO5Iog 825A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m22si1468844edq.478.2020.10.29.01.57.10; Thu, 29 Oct 2020 01:57:33 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725914AbgJ2CWp (ORCPT + 99 others); Wed, 28 Oct 2020 22:22:45 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:6706 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726843AbgJ2CWd (ORCPT ); Wed, 28 Oct 2020 22:22:33 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.60]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4CM8Mw1s3tzkb7g; Thu, 29 Oct 2020 10:22:04 +0800 (CST) Received: from linux-lmwb.huawei.com (10.175.103.112) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Thu, 29 Oct 2020 10:21:53 +0800 From: Zou Wei To: , , , , , CC: , , , , "Zou Wei" Subject: [PATCH -next] net: stmmac: platform: remove useless if/else Date: Thu, 29 Oct 2020 10:33:52 +0800 Message-ID: <1603938832-53705-1-git-send-email-zou_wei@huawei.com> X-Mailer: git-send-email 2.6.2 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.103.112] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix the following coccinelle report: ./drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:233:6-8: WARNING: possible condition with no effect (if == else) Both branches are the same, so remove the else if/else altogether. Reported-by: Hulk Robot Signed-off-by: Zou Wei --- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index af34a4c..f6c69d0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -230,8 +230,6 @@ static int stmmac_mtl_setup(struct platform_device *pdev, plat->tx_sched_algorithm = MTL_TX_ALGORITHM_WFQ; else if (of_property_read_bool(tx_node, "snps,tx-sched-dwrr")) plat->tx_sched_algorithm = MTL_TX_ALGORITHM_DWRR; - else if (of_property_read_bool(tx_node, "snps,tx-sched-sp")) - plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP; else plat->tx_sched_algorithm = MTL_TX_ALGORITHM_SP; -- 2.6.2