Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2149815iof; Tue, 7 Jun 2022 21:24:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyK8nT9uRqquCzPnL1N9DnogFUSM9CkwuYl9Sas8ur+8wrIGJZBFwCBjPUmUG0nKbCK3det X-Received: by 2002:a63:4e0a:0:b0:3fd:b97e:36e9 with SMTP id c10-20020a634e0a000000b003fdb97e36e9mr12531520pgb.545.1654662289524; Tue, 07 Jun 2022 21:24:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662289; cv=none; d=google.com; s=arc-20160816; b=UxX8zJJSkmIq26/t9ZAPZn8aAAC7ayWedWNY65qnF4lRAU3QhWAfXNwmUZ39WX7K3j r8V/FAnWFOfrLJOEK2nP/mQXKcaQ49o+jywti5Y8MW98NAdj84+hy5bjl5sK8QZr4TZx xcIm8M1+ZvwGG9kkjPQQ38QP6S5fM1HTnwMXpi4t7Tky9gJ0yLpt2S+h+nmVn3wZWD2B eV82FsnhhegOQi8Bpx9Vmf/wS8SKxEeStsHDt1ZDdWxjLruM17kdeVAz/it409z8MbvK JRscuNrYu8FXjq16ZUDI98G9MoB1VaZn1SDacMqQJZSJjuaRRCjquQheLNknqklEsT10 Rj3Q== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=cxAM7ihHoqJnu9Hk330M1T8Zg5PQK6HkyhzYAgYEFXE=; b=xhcY94CYPklSfhtsIAp8k+PGKqw4p6UM7C2zmj92G1pItEkmUHgT1lQM2z1bRCvHfu x2QsYdWF3drig+bmFPoPCPKKj73pVAIwi8nkGFV+rSCj7wTbWc6++APuOro7/EbIJU9l 3h1f1ixkYI7H2kWMZX5NkFpYzFg7wpUA5uCLTeoAIcVGESOMd2dx0UTZcdRERAktAdsK wCQEEfqw6CSrT67mhbIIaFeK2WQwrBgYDBsHZ13ghzl8sUkTq+pb9C6L/x+/yh/iX22K /3J36RovZZR/8YbLoxLYFaItETWdTfeZv2Tq24kGrxr/Nq8d8XMjBkGqNNmBM7H6mRYU KSwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="lWF/3oRO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id h62-20020a638341000000b003fe2a427bb3si1676901pge.94.2022.06.07.21.24.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:24:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="lWF/3oRO"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2E9D743CAAF; Tue, 7 Jun 2022 21:10:20 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346655AbiFGR2h (ORCPT + 99 others); Tue, 7 Jun 2022 13:28:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44940 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346277AbiFGRYN (ORCPT ); Tue, 7 Jun 2022 13:24:13 -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 DA6B91EC63; Tue, 7 Jun 2022 10:22:17 -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 350EE60BC9; Tue, 7 Jun 2022 17:22:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FCAFC385A5; Tue, 7 Jun 2022 17:22:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622536; bh=t7o3dVSPbYAXzDXsGXvIxTwGgdjNZH7ytre5uqNhv44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lWF/3oROEhTdrSZT42qKjWm59IvZyvQvkp/6a7xT/s/84BvZG1maBQUvHCH0Wa8as 46olfDQmKbKumfVKVd3Sq1u+LSyM8+G4gcwALlylQ8tKcf17awGECJMbB9VB5TYtfJ ep2y+wqQd8vMpYM06QMvMu09yfQmDy3nRg6lzjCo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jakub Kicinski , "David S. Miller" , Sasha Levin Subject: [PATCH 5.10 094/452] eth: tg3: silence the GCC 12 array-bounds warning Date: Tue, 7 Jun 2022 18:59:11 +0200 Message-Id: <20220607164911.360854879@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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