Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3812053ioo; Mon, 30 May 2022 10:08:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx11lgntBpXpQNM0h155fI59sYTrRvQ9BpbMXK018XT90I6rKQ8IYV0xpodkYyd5zzLS3nD X-Received: by 2002:a17:907:6088:b0:6ff:16bc:98da with SMTP id ht8-20020a170907608800b006ff16bc98damr22159859ejc.441.1653930498390; Mon, 30 May 2022 10:08:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653930498; cv=none; d=google.com; s=arc-20160816; b=Z9KF2vqlWI5urK6RvtBXCz0hAUCXuSuOwtt3Tlv1sT38AuwCxmbHFaKDjijrwiDdS7 zx3LfF+fIPoAy+KgEdB6bRiGiHUp+kbdn5Yrh7C1Il0/HWEb1u2bt1YbwfiIek+DQALm bM9Opj6fYJlt7k3nXZcFucix1a3hAKgan55gNssFqrOoW38BeGob73teGe5P5WTt+wx7 OuiQDtEkNGkNbHhUlnEIM2GJ618eXS4BW4fVvjDPAIPxyTzdOzhRMlfi7bLXK/Qh6M9E Ac2MU/iBBnSv7cEXXyDHgk/Ny/nK+329kRDTv73316QTLNPUfaFABgI5hvoyzWTRZpnA Da4A== 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=cxAM7ihHoqJnu9Hk330M1T8Zg5PQK6HkyhzYAgYEFXE=; b=cVzbFzTeyP7ITxcEb+EBBkNpXh8B33aAOhLkoX7ItayNGEQaJsjr3brNRs3nVfFDeY +Qah3c8eNnIblWcHDkZ5Ii7X+13Qki8V5QLstfv2NmMkw1SNqesvE25G0i6ycZ/gkIiA SpPSjZmU8ADa2lWhTtr0taIIcKJLFnq/DuFU+PmOTGD2KsThrKNfyuS6dgv/yWwzyA5f bopaytqMnjYI7biRyxKBLZox4+c3W+9BZfQXDjWyl3El+cs6DkKq7rcDBmjMY5isp8RA 6HZQCgqxa2LE1ga3Y4GW+DTeT9GZphQIEdvDbnmA6d4iwPxyCygggepyg/WlXh6AzGpr pDtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=trDVC1tc; 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 hc39-20020a17090716a700b006fe98e19840si14735283ejc.733.2022.05.30.10.07.51; Mon, 30 May 2022 10:08:18 -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=trDVC1tc; 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 S238548AbiE3OiA (ORCPT + 99 others); Mon, 30 May 2022 10:38:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42818 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240578AbiE3OTz (ORCPT ); Mon, 30 May 2022 10:19:55 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 15FA91248D4; Mon, 30 May 2022 06:50:00 -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 ams.source.kernel.org (Postfix) with ESMTPS id 56A5FB80DAC; Mon, 30 May 2022 13:49:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24528C385B8; Mon, 30 May 2022 13:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653918560; bh=t7o3dVSPbYAXzDXsGXvIxTwGgdjNZH7ytre5uqNhv44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=trDVC1tcAtT/KcsWgWcIdCzoWfneqgE5EBWDb5ATXMtSBXjvs26cI4VIyOVQIpr7F K2lPTXAurktRhPC+cflLdQli3p5styg6Un7Qe6Bmhp70Uua4ATb5+xbAyOF4ov3rrS jvueyfI/eYDMy2k6oJQCz/vUTQw/TpIW+VE8y5LsijMVuHnwIp3HsxEofAtGVkf4e3 N147VqDE5+0m8AGq++XHWXWLXX0zgF8HaibwF0dqw3LaR1ebb9IYWHIP0uZlR8Mm7a BSX9aSgg8Q2UhPlAEYx6xmSiWVesNE7wZ7lfC3RIhbU4v/hTiAOL5wIp3GSGnYuVT2 Ge4h3qHQEcewg== 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 5.4 54/55] eth: tg3: silence the GCC 12 array-bounds warning Date: Mon, 30 May 2022 09:47:00 -0400 Message-Id: <20220530134701.1935933-54-sashal@kernel.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220530134701.1935933-1-sashal@kernel.org> References: <20220530134701.1935933-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 7046ad6d3d0e..ac50da49ca77 100644 --- a/drivers/net/ethernet/broadcom/Makefile +++ b/drivers/net/ethernet/broadcom/Makefile @@ -16,3 +16,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