Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp442535iog; Mon, 13 Jun 2022 06:05:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8r9sBdl+wtRgvJziobnta3+PZlxnO7c3l571l44ttwxmhYWNlgPHpU/PZPuOlR86kmWYA X-Received: by 2002:a05:6a00:1901:b0:518:916e:4a85 with SMTP id y1-20020a056a00190100b00518916e4a85mr59624706pfi.65.1655125559145; Mon, 13 Jun 2022 06:05:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655125559; cv=none; d=google.com; s=arc-20160816; b=fXSBs3IoGYhEPrsFXbS6k7lvv3bYdY10/y9lUo7U7Qj1Fnz5Ym9W68g/sewTy0hJkW evFp+zZHjjNr6FnAnlcBsdpG1AY3GI2yL9THB0Pci4zriTtogt7LiYjEOKvTfJjSlrQz TYLrEUZ+xZAHzj+lO0AwmsoY+4yMcl4EgNRETSauvxzTyrPlxhjCMpjUgc0uVaiXRHxV DaWRAeM3+Q6PxAXx48nGcOuSdD2R/giPBPvVKCzt/+TVWchOs8g1PDvj/1x5bIZjcSeo FaxIU0SVD5G1eDn+nHCREh54TyIJEeL9hbT9dJVSSk5HtcKFJPqMwWozvJo25SLgqZXK nCIQ== 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=yCSc9PnxipsMKYd+gMI58JsIuQdi24LeFcayIZoGnkdv3YTQeGeBY/UaHK6K419Pre t96aQDL9opYowCd+X/FQyunQXnpThClIrABhfX/umFjtmKqWBcwukYXBF8WI/NbKCvHo GE5HJKMVCLfHyFFvMiXe9xTsw8/8OWUd+HxiUswIvYquMjoZzijKSWYZtZCKTSBEx8o9 EWp6/Ya99O/wo1QEwJd7TMTl7pBAbwsRQ8P6bcOoZ2OjNNNpZ40KLZCNlysf1BH2KoVU ILEqaefDIh/DYPwCJGQE/qsa8q9KpHiaAH5CA+msFGdIlYpvGS+VViNcsmObBjR7AnmR kfRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=VUs52iAX; 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 h11-20020a63210b000000b003fa52e29463si9810591pgh.764.2022.06.13.06.05.39; Mon, 13 Jun 2022 06:05:59 -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=VUs52iAX; 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 S1351614AbiFMLG4 (ORCPT + 99 others); Mon, 13 Jun 2022 07:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44326 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1350560AbiFMK6n (ORCPT ); Mon, 13 Jun 2022 06:58:43 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C1E9192B2; Mon, 13 Jun 2022 03:32:33 -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 3D611B80E5C; Mon, 13 Jun 2022 10:32:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D6D2C34114; Mon, 13 Jun 2022 10:32:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1655116351; bh=t7o3dVSPbYAXzDXsGXvIxTwGgdjNZH7ytre5uqNhv44=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VUs52iAXFXkb3hm/IPAuoaVD/WYfwPTuW/SskttXZQnK01Z02uNj6C4MOj3gOfYUD nQUPMAsvVgEtZIZ+bfjuTkAdoZCiYBTgllyHqfbtMERFLPSr+5geWdH6t9SMi/BkVV PF09z2DH2ZICw+6exRiBJMsWPDCQAEAyxFSxOAns= 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.4 061/411] eth: tg3: silence the GCC 12 array-bounds warning Date: Mon, 13 Jun 2022 12:05:34 +0200 Message-Id: <20220613094930.345320196@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220613094928.482772422@linuxfoundation.org> References: <20220613094928.482772422@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