From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0D01FC433EF for ; Fri, 20 May 2022 16:50:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347235AbiETQuP (ORCPT ); Fri, 20 May 2022 12:50:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60756 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239565AbiETQuN (ORCPT ); Fri, 20 May 2022 12:50:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 440AD36313 for ; Fri, 20 May 2022 09:50:13 -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 C42E261E76 for ; Fri, 20 May 2022 16:50:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D66F5C385A9; Fri, 20 May 2022 16:50:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653065412; bh=qWLxXVYRQ/qtEpXVWNFXSRg534yfFjTKs7wBQsMpy3A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=ACC3/88Hp0JJ5Pj08fFGNyw/Y13U7J5fxDyccN72gg3ZoI3QJ8d9JGbaCWGShxANY I1syGlCRfUW6nW2IykGtyEzB92S5s7dh7n02vD2yMCk/a/0ALbF+78lXQ9XjVY673d Z2mTogUDD09oN/Z2Xs7E2QtbTSg6I7DS5N8NUywuHuspGKjZllDPkKLIjYA7FhnlTN Rh415EBZoA7ze99wE7MryVj3671OEqjZIIb5qaxfvTnCKFPb8avqHtevdOxuZsPIBn FmcDVNT+atmmPFPxyvB9hRIjCFYr0vzg5iJwGSah9uvKmLUhzWXbmm1n2oP/V1B61n wvp9s9owW19eg== Date: Fri, 20 May 2022 09:50:10 -0700 From: Jakub Kicinski To: David Laight Cc: "davem@davemloft.net" , "netdev@vger.kernel.org" , "edumazet@google.com" , "pabeni@redhat.com" , "jesse.brandeburg@intel.com" , "anthony.l.nguyen@intel.com" Subject: Re: [PATCH net-next] eth: ice: silence the GCC 12 array-bounds warning Message-ID: <20220520095010.0f85db7f@kernel.org> In-Reply-To: References: <20220520060906.2311308-1-kuba@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 20 May 2022 12:58:35 +0000 David Laight wrote: > > +# FIXME: temporarily silence -Warray-bounds on non W=1 builds > > +ifndef KBUILD_EXTRA_WARN > > +CFLAGS_ice_switch.o += $(call cc-disable-warning, array-bounds) > > +endif > > -- > > 2.34.3 > > Is it possible to just add: > > CFLAGS_ice_switch.o += $(disable-Warray-bounds) > > and then ensure that disable-Warray-bounds is defined > (and expanded) by the time it is actually expanded? > This might be before or after the makefile is expanded. > But it would mean that the work is only done once. > I've an idea that 'call cc-disable-warning' is non-trivial. Happy to do whatever's recommended but the $(disable-Warray-bounds) does not work, I still see the warning.