[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210510135656.3960-1-thunder.leizhen@huawei.com>
Date: Mon, 10 May 2021 21:56:56 +0800
From: Zhen Lei <thunder.leizhen@...wei.com>
To: Rain River <rain.1986.08.12@...il.com>,
Zhu Yanjun <zyjzyj2000@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>
CC: Zhen Lei <thunder.leizhen@...wei.com>
Subject: [PATCH 1/1] forcedeth: Delete a redundant condition branch
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 <thunder.leizhen@...wei.com>
---
drivers/net/ethernet/nvidia/forcedeth.c | 3 ---
1 file changed, 3 deletions(-)
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;
--
2.26.0.106.g9fadedd
Powered by blists - more mailing lists