All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev <netdev@vger.kernel.org>,
	thunder.leizhen@huawei.com, Andrew Lunn <andrew@lunn.ch>
Subject: [PATCH] net: forcedeth: Give bot handlers a helping hand understanding the code
Date: Tue, 11 May 2021 14:43:30 +0200	[thread overview]
Message-ID: <20210511124330.891694-1-andrew@lunn.ch> (raw)

Bots handlers repeatedly fail to understand nv_update_linkspeed() and
submit patches unoptimizing it for the human reader. Add a comment to
try to prevent this in the future.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
---
 drivers/net/ethernet/nvidia/forcedeth.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
index 8724d6a9ed02..0822b28f3b6a 100644
--- a/drivers/net/ethernet/nvidia/forcedeth.c
+++ b/drivers/net/ethernet/nvidia/forcedeth.c
@@ -3475,6 +3475,9 @@ static int nv_update_linkspeed(struct net_device *dev)
 		newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
 		newdup = 0;
 	} else {
+		/* Default to the same as 10/Half if we cannot
+		 * determine anything else.
+		 */
 		newls = NVREG_LINKSPEED_FORCE|NVREG_LINKSPEED_10;
 		newdup = 0;
 	}
-- 
2.31.1


             reply	other threads:[~2021-05-11 12:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-11 12:43 Andrew Lunn [this message]
2021-05-11 13:48 ` [PATCH] net: forcedeth: Give bot handlers a helping hand understanding the code Leizhen (ThunderTown)
2021-05-12  1:22   ` Andrew Lunn

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=20210511124330.891694-1-andrew@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=thunder.leizhen@huawei.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 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.