From patchwork Tue May 11 12:43:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 12250855 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AB19CC433B4 for ; Tue, 11 May 2021 12:44:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 463916191D for ; Tue, 11 May 2021 12:44:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231563AbhEKMpH (ORCPT ); Tue, 11 May 2021 08:45:07 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:34990 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231285AbhEKMpF (ORCPT ); Tue, 11 May 2021 08:45:05 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=Content-Transfer-Encoding:MIME-Version:Message-Id:Date:Subject: Cc:To:From:Sender:Reply-To:Content-Type:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=3oO6HrlHIr+fd9g4x6LVUUxxpjFRVlenNFNXGfb7eCQ=; b=uLj4lhkppsuY6RZsYD2NAaHnyS qJ700YwfZg98xbVlvPzvhGNH7qQPZ/KYUHQgaKazFForpxTqD4BAE+JPFGsIwdSFIPS23uin8krXx bVsWW08dbF2MsWF7naIL4b1ypkXi8Ay1BzIdQeJ1SfBJXQQiwwd8HGwOXhUAKjYNijOk=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1lgRjx-003jzN-3Y; Tue, 11 May 2021 14:43:57 +0200 From: Andrew Lunn To: Jakub Kicinski Cc: netdev , thunder.leizhen@huawei.com, Andrew Lunn Subject: [PATCH] net: forcedeth: Give bot handlers a helping hand understanding the code Date: Tue, 11 May 2021 14:43:30 +0200 Message-Id: <20210511124330.891694-1-andrew@lunn.ch> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org 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 --- 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; }