Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp454908iog; Mon, 13 Jun 2022 06:17:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxChxYS/Aacb5pdgaB6Bpd1O83IK0nLQYUPQhp77s2/EmRqwfWt6VFMmab5/nftPhi9kczc X-Received: by 2002:a05:6402:50ce:b0:42e:2208:bd8c with SMTP id h14-20020a05640250ce00b0042e2208bd8cmr60244399edb.216.1655125295487; Mon, 13 Jun 2022 06:01:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125295; cv=none; d=google.com; s=arc-20160816; b=OM01KuJE14mmuVIZYIzZG1OI+6R910s2FfJDgSafVBaLAkUfZqlYowqaBVcUxqODDb mp2350y3LW1j3Xl5VbvEVLzlKQ8XHDw6u6H48/5Upzxx7/68yDrVlpJr23RQ3tgux+av tG4wLQOKHICWt/wLBlzwcl1zMpPgjHnxPd/fxUbT5YjL4EAFAIwuxESB6MrgDhn0DrY+ 7VHoCmAvKhk8vdtXFsXf+qtvj20NUhLUxF5B7M25r4xTXkJ2ICzzuyr1siowEE7Ti+b+ Ol0ML7SaOJMHlKQ3Fa5Y+D7HFK1yeKuQb6vGvZ5OpIN+Mx53eLi4u3Wr9uaDtivBTTEO u7JQ== 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=iTbUU8QUffM2abtSG+RvisqQfVs47wdFW4dKh/LDxA8saFAFsG/bQKDftON0jOpytr v8Uyz4vV3XDl/Ek6zkT8Oz+tFu0O9qlJLpkA2esijRGt7o3KaSca3gTrum2W9MLJh07v nDt43Y75+WHCG4qAHWP9TNoJqWzgws0b6oKp47FNDZMBs4rNxary/EyNTJmBSrO+6m8z sTzfzJKphxUq+qLVMEL10ymPjsFftC7ieno3lHJiCGFOQW/dlXoDGumDb+7oexRRa6ft LHlr3sf498loZ/xPfSJMmAUMCNXqsBfYbj1rMaUoBpT3mSIk1hvNFygp2T+AFQRxhXhg HPfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="Lq2/J0oX"; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ht18-20020a170907609200b007152a3ee4easi7900839ejc.664.2022.06.13.06.01.06; Mon, 13 Jun 2022 06:01:35 -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=@linuxfoundation.org header.s=korg header.b="Lq2/J0oX"; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345434AbiFMKlP (ORCPT + 99 others); Mon, 13 Jun 2022 06:41:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36830 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348136AbiFMKjY (ORCPT ); Mon, 13 Jun 2022 06:39:24 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79B1915834; Mon, 13 Jun 2022 03:23:19 -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 C065760EFB; Mon, 13 Jun 2022 10:23:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D19F4C34114; Mon, 13 Jun 2022 10:23:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655115798; bh=t7o3dVSPbYAXzDXsGXvIxTwGgdjNZH7ytre5uqNhv44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lq2/J0oXsgcxoJo81OgJg48P3V//YB3DTzCTyT4uA1tJDHocKvkx/FpzaJXx2SYQz qN89PQzWckQo9r7kPYFaHECzTtN2jeefCVPheoMPepgjPL6qluYYJvCqrwSA5g1jsf 8Rr5+GkBbNCMeu1UdcpPi6OIs3PZBDXfhjePXlZk= 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 4.14 034/218] eth: tg3: silence the GCC 12 array-bounds warning Date: Mon, 13 Jun 2022 12:08:12 +0200 Message-Id: <20220613094916.357060620@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094908.257446132@linuxfoundation.org> References: <20220613094908.257446132@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=-8.3 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