Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1998422iog; Sun, 26 Jun 2022 04:11:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t43U88eWnsjL6T33jG44uIgkj9RsJ6BEon3yX6edlJdMoSGdEMzjW1Ev1IYR3M7/hrvQHO X-Received: by 2002:a05:6a00:c94:b0:525:7deb:6933 with SMTP id a20-20020a056a000c9400b005257deb6933mr9146062pfv.76.1656241884446; Sun, 26 Jun 2022 04:11:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656241884; cv=none; d=google.com; s=arc-20160816; b=gfm5DqW7FxMH2vTJPIsttZJXzl6aE2l6pNq/yMQwPw20LZFiWHZEuet2hYksVkgwlY tGvTa0+Oo/A2XDG+2FRCTdwwpQPswM1v69VbiS6TdgGY6uBTIEuFZRCCSvp2Pvx0yBqW erSDcJu0AekH4FmYzR8ws70I56J53kQy/haPCpxvA5bmg/gSqHKP0EO4Cpyv9ZNZiWmV mKtPcMl8k/Wm3t7zkS7pzPlSBruElVAIWlFTuwL7L3i9Zlzo4e768nYmuSrEl1cb2wAC 9C8xg3e5aJuJnMbrchnwWPngMaV3dHoL9SU2Hs12Fypxa8NWxE/LDB5arQNQkwkJ/CVj JJfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=vKlqoyPKnKslJ3wEQV5XgtBsGKT7Vr7TM/ONNoU26hs=; b=kPKzuDzZAR7e0cwZddcn8O0Ce9Q5Qmnj2CCV8a30BeKv22uUViiH8vHAbYZfhYXb/V Wux4Y+v+VYleV0lkzZIfeeihy4QKjriZkD1DQfw8FUCXwAc9tuHXRJTFhq1BCyoq4Br6 DkdcMJ9BYemirzc/y6uVnxon2Z7xpzoeiiyER22ObqIKR7qbRRQXU+PSdfEYHs8qIcnT 9nkb6gWtLAh3jnySpQUzaY5Edum+XBfWizu49Hg5CPrExf2GiBBrWpshSZHqLrATH1y3 zY29NgiQyJESPGNw3emmj8Qo7BYYTKNyw/Rp/cNk+UjQ900TSGgQxKs+76Y8C59r1VV3 EKLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EP4bnODZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c12-20020a655a8c000000b003fb04d0b55dsi10605094pgt.565.2022.06.26.04.11.12; Sun, 26 Jun 2022 04:11:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=EP4bnODZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234338AbiFZLIz (ORCPT + 99 others); Sun, 26 Jun 2022 07:08:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48966 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234289AbiFZLIw (ORCPT ); Sun, 26 Jun 2022 07:08:52 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D8648E0F3; Sun, 26 Jun 2022 04:08:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=vKlqoyPKnKslJ3wEQV5XgtBsGKT7Vr7TM/ONNoU26hs=; b=EP4bnODZX7LCzr5lCEmixTYieF l5C7rTx7H45kcVY+a0ztUc+QVg9w21CGmdESZvJfkJhJD6Dulky2d5wGGDP//NEziZmwqSabEEaRl wskpkWRfQ0/fTaQIXyVlWEAToM0FWs7ycXPXIZh+wmHJbiRzya0ub39zRKbMyq011EL4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1o5Q85-008Hrf-7X; Sun, 26 Jun 2022 13:08:37 +0200 Date: Sun, 26 Jun 2022 13:08:37 +0200 From: Andrew Lunn To: Praghadeesh T K S Cc: Rain River , Zhu Yanjun , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , 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 Message-ID: References: <20220626103539.80283-1-praghadeeshthevendria@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220626103539.80283-1-praghadeeshthevendria@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > --- > 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