All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] forcedeth: Delete a redundant condition branch
@ 2021-05-10 13:56 Zhen Lei
  2021-05-10 14:19 ` Zhu Yanjun
  2021-05-10 19:59 ` Andrew Lunn
  0 siblings, 2 replies; 9+ messages in thread
From: Zhen Lei @ 2021-05-10 13:56 UTC (permalink / raw)
  To: Rain River, Zhu Yanjun, David S . Miller, Jakub Kicinski, netdev; +Cc: Zhen Lei

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@huawei.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



^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-05-11 12:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-10 13:56 [PATCH 1/1] forcedeth: Delete a redundant condition branch Zhen Lei
2021-05-10 14:19 ` Zhu Yanjun
2021-05-10 18:31   ` Jakub Kicinski
2021-05-10 19:52     ` Andrew Lunn
2021-05-10 23:31       ` Jakub Kicinski
2021-05-11  5:24         ` Leon Romanovsky
2021-05-10 19:59 ` Andrew Lunn
2021-05-11  1:43   ` Leizhen (ThunderTown)
2021-05-11 12:20     ` Andrew Lunn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.