Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2143540iof; Tue, 7 Jun 2022 21:12:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4RWRIERaumma+drawLmLvDwQS8zw64HF4d8tlP/RuAXsMeOrxqwJMlkYgMtCUeVN/lVGp X-Received: by 2002:a17:90b:2246:b0:1e8:5531:5e61 with SMTP id hk6-20020a17090b224600b001e855315e61mr22183888pjb.86.1654661537284; Tue, 07 Jun 2022 21:12:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654661537; cv=none; d=google.com; s=arc-20160816; b=E/up7IVqVrKxn2CN5NLaTgHeOiRDFWFiKhkSGxzRWWLlCPvKP6kSX8zMbYH/FXQet+ w5rVaqkZPsLg0J46pbc9B89zyQZST/tBSlCInalPxZTLZILgxShogHF+oK1uPyTBekAb F0977Af02V1TNQ1xOrGIEd1yuTjApyEd2j7JHLIgOtn1/3WudosVaFCfCwUmCXYyfuHG QOaBMbCclskSSLPkkiIliGggh67aSPppxCFWpL6249Zg7UJMM4TJAL0MN3/K1rbf+vsD xpUOEZfhnxRU2nJyumJobGHyW29rkzN3C11gWlj6WbjvNBr72N86ezMgK1a+ym0rVzuz 17CA== 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=/4wbdOBzwnX7xIl9t4LeEqLUzJqJm9xKT/dC4xrQYzY=; b=FEjqyouOM9iB4qHiOthEydz/jMHhFwbCg+t8Wrhfb9zkM7cOha5pQpjfFSCBj/Uy9Z iMgWJNjsWGV81wqsh+t4T0xOnsQm3Mr87c3qrCfMXunjDsV/OnXlCkPSHgDgLDyC/xN4 TvLfgsGNhwjtg9IBy09JgBs/SQNPvJfuF5kTgcoaLBu+iHba6853CsFIzJvUL/lUUVql pZlpt3el4Xokt7MXTqGk5xM27gfyEkqsm6btynn6L8c6EpJvje0HqXxYnPGEnyqsDXFn w0cR1fXenvjQDtKCeWKsyps6JrF48BU05axSNr5+GMbOwGqFe1gHhfQU4Ys/qSNfW93y QozQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ijfdGRRP; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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. [23.128.96.19]) by mx.google.com with ESMTPS id h189-20020a6383c6000000b003aba3e87b30si451567pge.155.2022.06.07.21.12.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:12:17 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ijfdGRRP; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 C90C22AD99E; Tue, 7 Jun 2022 20:43:46 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1384410AbiFGWbJ (ORCPT + 99 others); Tue, 7 Jun 2022 18:31:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380727AbiFGVQy (ORCPT ); Tue, 7 Jun 2022 17:16:54 -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 2B08821F9DE; Tue, 7 Jun 2022 11:56:45 -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 D7669B82391; Tue, 7 Jun 2022 18:56:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 34DACC385A5; Tue, 7 Jun 2022 18:56:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654628202; bh=sm8MbBlNG5K6X9hLCmzFjLBYl5czMKscsEUm5HoPOMk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ijfdGRRPCGsBmDD14XI/Nm1Pwve/lk3659+UqNu2cDCflaPFUbu0mMYAsbTwbIHfu w/pyap0CbYC9xp4FlLqJTwAk8OA//MPRTa41WEOnQVBVCRwHv9VVDOXYXfLB5I5I9N ZwYbmMDRGgca5iOgpD3QGPVurGWbLXzX5Z7NrwY4= 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.18 202/879] eth: tg3: silence the GCC 12 array-bounds warning Date: Tue, 7 Jun 2022 18:55:20 +0200 Message-Id: <20220607165008.709160263@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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 0ddfb5b5d53c..2e6c5f258a1f 100644 --- a/drivers/net/ethernet/broadcom/Makefile +++ b/drivers/net/ethernet/broadcom/Makefile @@ -17,3 +17,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