Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp5031811ioo; Tue, 31 May 2022 18:06:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyL/8XcSJIaBpUXEE1B5kULCtE9/+AoWIT46KODvxPO3MrsBqwSKpDJadY2IsTNdorYmRtf X-Received: by 2002:a17:906:4b52:b0:6ff:237f:ad04 with SMTP id j18-20020a1709064b5200b006ff237fad04mr24971395ejv.3.1654045593353; Tue, 31 May 2022 18:06:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654045593; cv=none; d=google.com; s=arc-20160816; b=I5JFoU5t/MKExlAT0lCUi6RONHmOeipbf9fu1fTMcnAqAK4dWvShck74mMCWA+iNxq U32e7B2Dy/VDaCLBPnCwmuDaRjYYHlDqXuB4zT4gUvEhgqzEQc0oCPh7LCU1r/tpMv1P Vnd/KzEZmFJ/BDSCeOUzC/GFahKpTOqrxsJ4DAELlG6bhvpJFZUipMVKQEM0+9KrC25u KEHqyu58sL5SfexPQmQP8mStmfGA9sXVdDfa35Z0x1lmNQSNedduPXL+6v9N4ds4G5wu ITClNx4Jvpj395SBix1wIEt3nKh3vDUxyD1uQgQ6j2R3eHghWROfzlcuSK6aYtU5EV7b MjKw== 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:date:subject:cc:to:from :dkim-signature; bh=CAOKi5TzLR6zHfsftsQgamDxxFklg0/+nMEbyoH08RU=; b=ubhouRlZLDp8V+gCWaVChxAJt6IonMFZYf/F95wFK9EguhR7AWoRyiz1yQ8uIvX0ja aadC51wiOKzmYUVutvWCIYWaaj0mbrFnYtRGIV6qCLeP3uqe9V09OV5dWakmXzgeuCWe bk/PtKV0kudxLgqOA8YopEmX9k5JU6tnufy1+1p3qw7CMOH5x3sGXS1M7jzNe+Xi5EVV 30uLzbBl5ndSgG5Wjaed+YzLMvCobDy7c7fKrx1BaeBlvhksSY+o/3JARNhm/jqvWorR 7pjUvGSvNgA1nngkiXGu72o3Sn5HRlgJDsgkN8nSVP3SA56/1cw4qXg1Kwqod101VIA8 D/Hg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=jxGBEE29; 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 cr2-20020a170906d54200b006feb974badcsi490040ejc.674.2022.05.31.18.05.56; Tue, 31 May 2022 18:06:33 -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=jxGBEE29; 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 S240077AbiE3Oxg (ORCPT + 99 others); Mon, 30 May 2022 10:53:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242771AbiE3Obi (ORCPT ); Mon, 30 May 2022 10:31:38 -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 5F9E8131F27; Mon, 30 May 2022 06:53:26 -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 5748B6102C; Mon, 30 May 2022 13:53:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC737C385B8; Mon, 30 May 2022 13:53:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653918794; bh=nenEibBJQkf8B+U53841xOeYfUma/aYeU1WO7LivkSI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jxGBEE296v4VVyNLLPcr4MiotoS4X4i9oQnMIuDvs/zpL8WreOQZGqapXovmbVkrr rhRL7va1NUpAxWnj5YbLeftppS8BWuolD8Duk6chojVckfJMmJcUlnso0kLVvKTTGm wzUUSdrldRwv4+46xeUPNOtWt3o5aG7g7Vkx6nWGiumyNtur24suBnoMlX8c1JYXj8 +5Fijch7CGcYD1iIueOhj/qQFUYI63WR2uFkhoDtwo3RBT7QbqjKOPKpjpTSxoxsMy FmWcznR5mbFg9Kg2Hpw8wnpCW7E7/0W6rAq7mKJg/UomQa8THyhBaPcSs00LfkOje2 e3eTJvMbmNunw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Jakub Kicinski , "David S . Miller" , Sasha Levin , edumazet@google.com, pabeni@redhat.com, netdev@vger.kernel.org Subject: [PATCH AUTOSEL 4.9 24/24] eth: tg3: silence the GCC 12 array-bounds warning Date: Mon, 30 May 2022 09:52:11 -0400 Message-Id: <20220530135211.1937674-24-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530135211.1937674-1-sashal@kernel.org> References: <20220530135211.1937674-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 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 From: Jakub Kicinski [ Upstream commit 9dec850fd7c210a04b4707df8e6c95bfafdd6a4b ] GCC 12 currently generates a rather inconsistent warning: drivers/net/ethernet/broadcom/tg3.c:17795:51: warning: array subscript 5 is above array bounds of ‘struct tg3_napi[5]’ [-Warray-bounds] 17795 | struct tg3_napi *tnapi = &tp->napi[i]; | ~~~~~~~~^~~ i is guaranteed < tp->irq_max which in turn is either 1 or 5. There are more loops like this one in the driver, but strangely GCC 12 dislikes only this single one. Silence this silliness for now. Signed-off-by: Jakub Kicinski Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/ethernet/broadcom/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/net/ethernet/broadcom/Makefile b/drivers/net/ethernet/broadcom/Makefile index 79f2372c66ec..4211c6cd6b35 100644 --- a/drivers/net/ethernet/broadcom/Makefile +++ b/drivers/net/ethernet/broadcom/Makefile @@ -15,3 +15,8 @@ obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o obj-$(CONFIG_BNXT) += bnxt/ + +# FIXME: temporarily silence -Warray-bounds on non W=1+ builds +ifndef KBUILD_EXTRA_WARN +CFLAGS_tg3.o += -Wno-array-bounds +endif -- 2.35.1