From: Andrew Lunn <andrew@lunn.ch>
To: Praghadeesh T K S <praghadeeshthevendria@gmail.com>
Cc: Rain River <rain.1986.08.12@gmail.com>,
Zhu Yanjun <zyjzyj2000@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
skhan@linuxfoundation.org, praghadeeshtks@zohomail.in,
linux-kernel-mentees@lists.linuxfoundation.org
Subject: Re: [PATCH] net: ethernet/nvidia: fix possible condition with no effect
Date: Sun, 26 Jun 2022 13:08:37 +0200 [thread overview]
Message-ID: <Yrg+NZHBNcu3KFXn@lunn.ch> (raw)
In-Reply-To: <20220626103539.80283-1-praghadeeshthevendria@gmail.com>
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
next prev parent reply other threads:[~2022-06-26 11:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-26 10:35 [PATCH] net: ethernet/nvidia: fix possible condition with no effect Praghadeesh T K S
2022-06-26 11:08 ` Andrew Lunn [this message]
2022-06-27 18:38 ` Jakub Kicinski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yrg+NZHBNcu3KFXn@lunn.ch \
--to=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kernel-mentees@lists.linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=praghadeeshthevendria@gmail.com \
--cc=praghadeeshtks@zohomail.in \
--cc=rain.1986.08.12@gmail.com \
--cc=skhan@linuxfoundation.org \
--cc=zyjzyj2000@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).