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 6DAADC83F10 for ; Sun, 27 Aug 2023 19:54:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbjH0Txq (ORCPT ); Sun, 27 Aug 2023 15:53:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230053AbjH0Txb (ORCPT ); Sun, 27 Aug 2023 15:53:31 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B4F9BE; Sun, 27 Aug 2023 12:53:29 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id C87E360C81; Sun, 27 Aug 2023 19:53:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F11C6C433C8; Sun, 27 Aug 2023 19:53:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1693166008; bh=y9yVPCEcriR/n05MjZABboIIo7JC850DcSRHaghnx7g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GtovuFjDpIERjiLv2YugLZMtEsuWgLiMk9+wmF+eKblmCUf+S2WhOyOqrvqSElWjh JDJt3PJqHcY7HI/4eg16UwbWG04t9z/QtpGiJndhYeO1LUi6vKawrmsIotjxo9QOLN bkAfJQoTPALMZP2Vw+UrBbiqj7a2M588xV+UCMFNs2a5HyyXLWjtUILW5n4XUfCGF2 kunGtFxp0iviN49UC9dOCra6mZLehC3F8mEdtNt5NR/eZTN2y2KH+4k8NSjXiGl0h+ ZLGtHuBzxEeQcMXYn35TM5y0njCnrjf28j9W1tm4cWJgVONBcdxuXL1LaqwoHFRfuF xNJdAqYVJ1ZGw== Date: Sun, 27 Aug 2023 21:53:08 +0200 From: Simon Horman To: Michael Chan Cc: Mikhail Kobuk , Siva Reddy Kallam , Prashant Sreedharan , Michael Chan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Jean Delvare , Guenter Roeck , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, lvc-project@linuxtesting.org, Alexey Khoroshilov Subject: Re: [PATCH] ethernet: tg3: remove unreachable code Message-ID: <20230827195308.GX3523530@kernel.org> References: <20230825190443.48375-1-m.kobuk@ispras.ru> <20230827165130.GV3523530@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Aug 27, 2023 at 10:29:37AM -0700, Michael Chan wrote: > On Sun, Aug 27, 2023 at 9:51 AM Simon Horman wrote: > > > > On Fri, Aug 25, 2023 at 10:04:41PM +0300, Mikhail Kobuk wrote: > > > > + Matt Carlson > > Matt Carlson is no longer working for Broadcom. Thanks, got it. > > > 'tp->irq_max' value is either 1 [L16336] or 5 [L16354], as indicated in > > > tg3_get_invariants(). Therefore, 'i' can't exceed 4 in tg3_init_one() > > > that makes (i <= 4) always true. Moreover, 'intmbx' value set at the > > > last iteration is not used later in it's scope. > > > > > > Found by Linux Verification Center (linuxtesting.org) with SVACE. > > > > > > Fixes: 78f90dcf184b ("tg3: Move napi_add calls below tg3_get_invariants") > > > Signed-off-by: Mikhail Kobuk > > > Reviewed-by: Alexey Khoroshilov > > Reviewed-by: Michael Chan