lkml.org 
[lkml]   [2022]   [Jun]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] net: ethernet/nvidia: fix possible condition with no effect
On Sun, Jun 26, 2022 at 10:35:39AM +0000, Praghadeesh T K S wrote:
> Fix Coccinelle bug, removed condition with no effect.

This is not a coccinelle bug. If it was, you would be patching
coccinelle, not the kernel.

> Signed-off-by: Praghadeesh T K S <praghadeeshthevendria@gmail.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 5116bad..8e49cfa 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;

Please google this, see the past discussion about why this code is
there.

Andrew

\
 
 \ /
  Last update: 2022-06-26 13:09    [W:0.047 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site