Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3218178iog; Mon, 27 Jun 2022 11:41:51 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tUMN7+s7KrcxZnJkSGkIgOjBoyY1VhrZe3ITRpQcDtTm7kAToOqEKqMrfeM6y0IJgkUQBY X-Received: by 2002:aa7:96da:0:b0:525:1752:85b with SMTP id h26-20020aa796da000000b005251752085bmr16244381pfq.63.1656355311368; Mon, 27 Jun 2022 11:41:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656355311; cv=none; d=google.com; s=arc-20160816; b=ymw0CSjT6pJNo0tMl3uL7HK5QTX+UrQcuI4sVLR3B0QKU4We8sN8cJfCCYORDk35yU rPzFQ9yYD6nC10Eiz2rdDytfCM+maqLiPvWbn5qj3GOJKnzuE0c2KisqqEbLRbeS2Kqz V+MRLyLhO9RFxfphLgL6xmS3CAXOw3MrwToTqETM2jWnsLcrehQC7P+gOYd29MHPxWtL rv6LQCwjfpcPttb+7wk69FVsMPX64la4dL2Aonz6vkUq6707pKT9xSieUTWtBnCyaIW/ HVMnLqBt0OsSDBFr8d/cSWs0sfxb7K+hRR8hpHKcO30SYvm9qJTfBYWPz3vc9zGwlm92 VrDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=DBf948WDFIBXx61Ve92bVX1Xaf9znGjB/94fVvQmyv8=; b=KxY6if0Nw/bfQGKPDEZ4d7R/DuNfwaKD+MH8nsbg/bgAL8mMPTumcd2IEPtnX38Dj7 l9WDv86fsQxdAnrV1WXe6mX3Mj0aFxQ5bvwckoR9+M9wdkPqLRPW06im190Idbcl8I7i PMaNXzBKybacwM8xyx1Ssx3Fh5qfwjL17G2zxbVPp7IMTy39URKMZAvC/6QvB31tuKyd 9c799SGADc1VUYo8uF/cvs0mMNcSq5DLgzop390Iq7YHsA4I033BfrolJ6RR81VQDYnI y3v1LNH2WrNFfZwLgGfuymcV4DG5ckat7qhQZCxBmtZRa1ofo650sxMOhoSk5Qu0i8J5 +QOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=VTkRYWDj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n1-20020a634001000000b0040caec24b47si15569205pga.340.2022.06.27.11.41.37; Mon, 27 Jun 2022 11:41:51 -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=@kernel.org header.s=k20201202 header.b=VTkRYWDj; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240182AbiF0Sj2 (ORCPT + 99 others); Mon, 27 Jun 2022 14:39:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240402AbiF0Si3 (ORCPT ); Mon, 27 Jun 2022 14:38:29 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52D7F2FD; Mon, 27 Jun 2022 11:38:22 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E4E09615AE; Mon, 27 Jun 2022 18:38:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1B9DC3411D; Mon, 27 Jun 2022 18:38:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1656355101; bh=tpQhZQHIo3oAgckmaPgCZ4BNKAUK0XRiFuSAp70Cu8c=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=VTkRYWDjjVYa94ZaBuyuEozvQwpkROiN+nTDgabfp2ZHC/cee2Hx8BHgw1+hytmj6 sEoo/0DTgdMw35V5KIXKGb/BvgMC6OnHs9LZhmuT/3JTcODy6ENw+XyScjZAatC/oH tHRNBiKZmg9p5Du1OBbQnRg5N/QrEB/J+B5w+fpZVtoMNgYhrfpvo4y8V1+/Nn/njU uAGEcVETRgXf94TzYpa3HjRdW3Ihx9HJq4Fe2lo4fdGw8rW4rawyvAk/0OCvukW1ZR lIvo/+fDZ226OOEky0wzu5BnRo6whDVUE9/X0njAvotepWFidSZWqw75CwqOxc0PEb JL7WIM+kIENfg== Date: Mon, 27 Jun 2022 11:38:12 -0700 From: Jakub Kicinski To: Andrew Lunn Cc: Praghadeesh T K S , Rain River , Zhu Yanjun , "David S. Miller" , Eric Dumazet , 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: <20220627113812.08ae31f0@kernel.org> In-Reply-To: References: <20220626103539.80283-1-praghadeeshthevendria@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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, 26 Jun 2022 13:08:37 +0200 Andrew Lunn wrote: > 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. I'd say the commit message is better than the commit ;) Praghadeesh, could you fix Coccinelle to avoid matching: if (/* case 1 */) { /* BLOCK 1*/ } else (/* case 2 */ { /* BLOCK 2 */ } else { /* default == BLOCK 2 */ } Because 99% of the time that construct is intentional.