From patchwork Mon May 10 13:56:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Leizhen \(ThunderTown\)" X-Patchwork-Id: 433142 Delivered-To: patch@linaro.org Received: by 2002:a02:c901:0:0:0:0:0 with SMTP id t1csp2886930jao; Mon, 10 May 2021 07:16:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1usOxBRnTh4tNW+wkuuc5fEoeY1NcjhmP/3qmaeoE+/ghhQ88p8Pkeo/KfFy2b7DwE+9v X-Received: by 2002:a05:6e02:1063:: with SMTP id q3mr21980314ilj.52.1620656196704; Mon, 10 May 2021 07:16:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620656196; cv=none; d=google.com; s=arc-20160816; b=p0IBoJ06LxHyfL1A+r/xma6ng3zR7XhurcAsfE4r/0DBkYxEqyAQxTBrBTm4C8R58V BqDsgWz6JpYuECczh88Ls1Sb8eCIma7ujqUBXjtFezCEQwZ4OycDisoT1aXHCpaSU/2j kTrKtwFs2SQg0VfH3UnPryyNVuTQVuxMDCuddYcZvkeVX8iewy/eMZ5ZrlrsN0XCTTXT 4SLqZMzTQJFUer/iZiF1CBDwkUjPVt4wqarF8ZmeyJVFvXrAuCfK8lvCA2+DdNFyWgHp deRR72+hSpl8TIne+dqwcFiqzyNCXQOMLIUM+2zX20R0Gk48w3jIlj0pDs8O+5kbftt9 YpTQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=1uQBedvadUV9XyO+54EGjZM8ykibxRCkXkat5nVyeB8=; b=aA9QG/Cxp/teW8fWZ2msCACnWe7BXUohXXPmiNwPg+qkkk57fFQGs/yD1mnCjJKyWo 5UDRmg+OVsQw8LCqsYY9kz2YddZ/kWKkrr1RRufJfWooHdZ4Ushsdt9Mu5N/7GBFEb3H FEsJioFhkf2jpXvozxqgvKKCpbMcbXxXHOPaZU/M/3Vkts6KyWLJtP5j2kWpASZTv9LH hGpSBU4yZCEMT3GXaqiAyhJYMEIrxSUWEX3VcdFlaY0ZQzjwRTJfB3hHoVYkJvcOdu1v hh2Qgl3XX0LA4NAPHhbM8jm6bhRJvDxG+Di3afmzxpXYKUNpaElX204BGiUNOybwUSto M8rg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 q8si16406157ior.12.2021.05.10.07.16.36; Mon, 10 May 2021 07:16:36 -0700 (PDT) Received-SPF: pass (google.com: domain of netdev-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 netdev-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=netdev-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 S236024AbhEJOCO (ORCPT + 8 others); Mon, 10 May 2021 10:02:14 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:2437 "EHLO szxga07-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243751AbhEJN61 (ORCPT ); Mon, 10 May 2021 09:58:27 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga07-in.huawei.com (SkyGuard) with ESMTP id 4Ff2bt1rl4zCrCt; Mon, 10 May 2021 21:54:34 +0800 (CST) Received: from thunder-town.china.huawei.com (10.174.177.72) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.498.0; Mon, 10 May 2021 21:57:07 +0800 From: Zhen Lei To: Rain River , Zhu Yanjun , "David S . Miller" , Jakub Kicinski , netdev CC: Zhen Lei Subject: [PATCH 1/1] forcedeth: Delete a redundant condition branch Date: Mon, 10 May 2021 21:56:56 +0800 Message-ID: <20210510135656.3960-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-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org The statement of the last "if (adv_lpa & LPA_10HALF)" branch is the same as the "else" branch. Delete it to simplify code. No functional change. Signed-off-by: Zhen Lei --- drivers/net/ethernet/nvidia/forcedeth.c | 3 --- 1 file changed, 3 deletions(-) -- 2.26.0.106.g9fadedd diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c index 8724d6a9ed020a7..5c2c9c5d330b65f 100644 --- a/drivers/net/ethernet/nvidia/forcedeth.c +++ b/drivers/net/ethernet/nvidia/forcedeth.c @@ -3471,9 +3471,6 @@ static int nv_update_linkspeed(struct net_device *dev) } else if (adv_lpa & LPA_10FULL) { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 1; - } else if (adv_lpa & LPA_10HALF) { - newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; - newdup = 0; } else { newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10; newdup = 0;