From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CA4357B for ; Tue, 25 Oct 2022 23:17:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F1CB3C433D6; Tue, 25 Oct 2022 23:17:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666739838; bh=nV7OVDrwGLapIVrA2MkHe7ePYFXFsBK++LsqBN3LGxk=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=jgmD4R4nRxyvZqQf+RFkpy8OzZlwZWaN3uMpSb/mKDFK4G0lCt3Ub6SDpdtaf3acw RZVWqtWUdVWFpdnLdaoRDbX+u2XI7TUZeUGvvX6eMRqfThv4W+1QhoXi6FhA0uiu3U PNjHDugBCqcOWYunfi/Rxn2nqZEUG6HpBB5lfDfbMkst0/sSI7ZTmhUxaSyxO3Dp5g X0HKBuHzTUAQJMZ+v2mw/xPvuoxoT7NR1OW7a7axArGENNfisA0CnRHJWsile+/6Db VyiNFed0Lk2ahgi29Z9TjFLF2VANpmwGA00vmUK5eYV1xioMDnC9uB8Re4MJZgl8vv jUNx3NlKFq+vw== Date: Tue, 25 Oct 2022 16:17:16 -0700 From: Jakub Kicinski To: Doug Berger Cc: kernel test robot , Andrew Morton , ntfs3@lists.linux.dev, netdev@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-scsi@vger.kernel.org, linux-mm@kvack.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , Julia Lawall Subject: Re: [linux-next:master] BUILD REGRESSION 89bf6e28373beef9577fa71f996a5f73a569617c Message-ID: <20221025161716.1b92a033@kernel.org> In-Reply-To: <8fbc9d02-3c73-5990-85af-82eecb6d64e3@gmail.com> References: <63581a3c.U6bx8B6mFoRe2pWN%lkp@intel.com> <20221025154150.729bbbd0@kernel.org> <8fbc9d02-3c73-5990-85af-82eecb6d64e3@gmail.com> Precedence: bulk X-Mailing-List: ntfs3@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 25 Oct 2022 16:04:15 -0700 Doug Berger wrote: > > On Wed, 26 Oct 2022 01:17:48 +0800 kernel test robot wrote: > >> drivers/net/ethernet/broadcom/genet/bcmgenet.c:1497:5-13: ERROR: invalid reference to the index variable of the iterator on line 1475 > > > > CC Doug > Thanks for highlighting this for me, but I happened to catch it from the > linux-mm list and was just looking into it. > > It looks to me like a false positive since I am initializing the > loc_rule variable in all paths outside of the list_for_each_entry() loop > prior to its use on line 1497. Ack, indeed the code looks right. Thanks for investigating. > If desired I can submit a new patch to make coccinelle happy. I wonder if Cocci can detect writes. Let me add Julia for visibility. If not we can use a different variable for the "check if already exists" iteration? It could make the code easier to follow, IMHO. Or leave it be.