Re: [PATCH 1/1] forcedeth: Delete a redundant condition branch
From: Zhu Yanjun <zyjzyj2000@gmail.com>
Date: 2021-05-10 14:59:56
On Mon, May 10, 2021 at 9:57 PM Zhen Lei [off-list ref] wrote:
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.
Thanks. Missing Fixes? Zhu Yanjun
quoted hunk ↗ jump to hunk
Signed-off-by: Zhen Lei <redacted> --- 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