From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6E07C433EF for ; Sun, 26 Jun 2022 11:08:57 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234246AbiFZLIz (ORCPT ); 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> 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