From patchwork Mon May 10 14:10:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen (ThunderTown)" X-Patchwork-Id: 12248299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81768C43460 for ; Mon, 10 May 2021 14:11:46 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2A3DC60FF2 for ; Mon, 10 May 2021 14:11:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2A3DC60FF2 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=huawei.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=a0orZh3jKCUk7sHNwfmNkCbrn3PK5cszbhXZcAOzmjI=; b=Mjw9iTjT7KOHh7DFTqL6AE7liG 2prvSlKNr/C+Ds/LPMe+9aCoj/O1AqWffINVaCqScypACN8k46hTjKW/6dZCvOEAeUdFTGWmhQE7C rciuCfc0diwFQQMA0AAez0Est+juOxEYYgry5sakTqLaaca+8fmTuf2W70PmqGac67LMsTTgazExu ShE+NFHiwq3BbkZ99HQMz5TWHTXRJgoCnru7Lo/PjyHFcD5vN1DDD9iLRtflu9kgRojCJ4DJKx+QN DCr6T6TBFOxtaWd4BswVxIWRsoWmZVrKa5cJK6JB1twuHOcpobCa+anev3C744Bd7zLoDOWOLw0Ly CW4/fbDQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lg6c8-00Ea3c-PV; Mon, 10 May 2021 14:10:28 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg6c5-00Ea3B-CL for linux-arm-kernel@desiato.infradead.org; Mon, 10 May 2021 14:10:25 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:CC:To:From: Sender:Reply-To:Content-ID:Content-Description:In-Reply-To:References; bh=F639r3esPcNFNF6+Vc4cs2aX6VdJIVidzBOKuFuHoCg=; b=0lK7TpClCqmh4BCNmla1SOreil tEy04YmOYxu8Q5q+0qvQXJOj5MQ879o2ZCuadBkrXKhe/EJVabc9PnbAGbctkY1LrDj4Dg4Cm3OzO gOEmJ6IhV/LFwIeYnDfsJ4VJpHjomM5mxTwEy22AmQLkwJVsUJ5U8aFqYH3kwzVY2uk7XMczyg6hO dm/QoLZuz74ntr9LtHSc8OIAuxS14+XDp0SLwgGiEVszvYQUt3yrrD6lVwhj6u16AEaIDZZR3m/0K 2P/KrZjzZIcKA05lNcj8W52lEzOY556YjM84ZQEeAr20xRQ02RXA5D5XrEb/WQZPXT+e0WNCY2AqR K9OeUgPg==; Received: from szxga08-in.huawei.com ([45.249.212.255]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lg6c2-008nF8-ME for linux-arm-kernel@lists.infradead.org; Mon, 10 May 2021 14:10:24 +0000 Received: from dggeml761-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4Ff2s75Y7Yz19NV0; Mon, 10 May 2021 22:06:03 +0800 (CST) Received: from dggpemm500006.china.huawei.com (7.185.36.236) by dggeml761-chm.china.huawei.com (10.1.199.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Mon, 10 May 2021 22:10:16 +0800 Received: from thunder-town.china.huawei.com (10.174.177.72) by dggpemm500006.china.huawei.com (7.185.36.236) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Mon, 10 May 2021 22:10:15 +0800 From: Zhen Lei To: Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , "David S . Miller" , Jakub Kicinski , "Maxime Coquelin" , netdev , linux-stm32 , linux-arm-kernel CC: Zhen Lei Subject: [PATCH 1/1] net: stmmac: platform: Delete a redundant condition branch Date: Mon, 10 May 2021 22:10:02 +0800 Message-ID: <20210510141002.4013-1-thunder.leizhen@huawei.com> X-Mailer: git-send-email 2.26.0.windows.1 MIME-Version: 1.0 X-Originating-IP: [10.174.177.72] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpemm500006.china.huawei.com (7.185.36.236) X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210510_071022_916559_CFB1FFC7 X-CRM114-Status: UNSURE ( 8.45 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The statement of the last "if (xxx)" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei --- 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 1e17a23d9118506..97a1fedcc9ac04d 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;