Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp190266pxp; Wed, 9 Mar 2022 00:29:38 -0800 (PST) X-Google-Smtp-Source: ABdhPJz9b19vJh84lVtblhO3EYz8hIUfTdK7OjNyUw/OdHL0AgTjopyCwy8LMwt4Qlmrpi4LjT/E X-Received: by 2002:a05:6402:50ce:b0:416:798c:b167 with SMTP id h14-20020a05640250ce00b00416798cb167mr5237413edb.136.1646814578575; Wed, 09 Mar 2022 00:29:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646814578; cv=none; d=google.com; s=arc-20160816; b=YLThK9+36/+42ubSLOPwT1U+Fz45MTxr1oW1f/rujEXenJZLiB6CPgACdlaCWR1t7Z tdBxqJVTfUlRLbE4C9crIXoHRLxJGXYBH6i723RdsaYer+piRmnjcAPJNv0G8EM8DtBP XKCK1ZfRPGJvC4umuPK1yeYS/bY3K9mIk7gZnbJHlY4G7YeNfztR+6aMnY4eGmGPMWu7 fgj1h/+Z4HLa0PLQYmVmkvhinESDdPAAZuox8X1+6EpOkcwWx0QEMFHN4xO0AmxJyhWU HBgyyimvmwJRmkx3RKwgz4aQxEogzBuvzXJfsX4svX0t74YBdbCLy/+i/Ql3FBwxxut1 clbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :organization:in-reply-to:subject:cc:to:from:dkim-signature; bh=2HHPIKPnlQ76JBS0bfvUeC7FqArxiJgPbE90ltp5MmU=; b=JN5UviSmV5SY+oETHjIK5ppCNLftKmsJew73WK+jXezuanzKYqMhMgBs87hFIqg89J SQTNBJWBVAlAdA1DetHhSUIeX5D1/U8EKO323M1rUdSb9H3LPVBGNkR49c01sAl8WApi JBIzfZKKcFYlivi8CN3fljc//0aYLZ0qN9JP7Dh9RDBlNfIj0eSijNcEz/K9XvSHCl2a ViZfPDvggL5wvu4EVUuVn98xcnHxHBrTYnp3gLTeMv2rPqWKo3eyvjMDk3Ygwu2SxyUo Kg2COhpktlu6E4uAl678VHQludkbIM7OK3GWXH+fYpciTJfUNOlu+bSkuMt+e41oD2Cj lbTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=aKgwPTuR; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ss18-20020a170907c01200b006ce70da12c7si563819ejc.774.2022.03.09.00.29.13; Wed, 09 Mar 2022 00:29:38 -0800 (PST) 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=@intel.com header.s=Intel header.b=aKgwPTuR; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231285AbiCIIUn (ORCPT + 99 others); Wed, 9 Mar 2022 03:20:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231264AbiCIIUc (ORCPT ); Wed, 9 Mar 2022 03:20:32 -0500 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4605140E50; Wed, 9 Mar 2022 00:19:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1646813973; x=1678349973; h=from:to:cc:subject:in-reply-to:references:date: message-id:mime-version; bh=hLBK1t/r9Z48f8dSRNwh+u136IQEg0xMqQ5EbEwvT7Y=; b=aKgwPTuRF6SheFFJ7QFMCagcyzgbcXxjIk4ILwmEGg/0JAI96rN/B/pM ssCkOjdqlEkc1AN4981wf83bBycCVle+fcTWXAtezCd1OD45R5GlL1Vzt 8oB34dBAWdgXHB2r7RQjdPbNBm6xSGmKgRbQD9WsO3KznUVRUIjLzpU/k 7IYoKT3DTs3d2iDXO9/T1EruotchsJZxxzQuaAAbRjvZg/26m0C2Qa1qU DIlmYkgsJ3wOVwiKtEMg6g2GkRgGjvqGDFeV7yewjEqJxpI0E07TAg1yi md3eV6oYTk3a1+kRfrGXWtdyb6ZxEdgRlHEBTObtqN9bhq1BXF8P7my98 w==; X-IronPort-AV: E=McAfee;i="6200,9189,10280"; a="254649003" X-IronPort-AV: E=Sophos;i="5.90,167,1643702400"; d="scan'208";a="254649003" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 00:19:32 -0800 X-IronPort-AV: E=Sophos;i="5.90,167,1643702400"; d="scan'208";a="711860724" Received: from byrnec1x-mobl.ger.corp.intel.com (HELO localhost) ([10.252.29.235]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Mar 2022 00:19:27 -0800 From: Jani Nikula To: Arnd Bergmann , Masahiro Yamada Cc: alexs@kernel.org, arnd@arndb.de, arnd@kernel.org, dsterba@suse.com, elver@google.com, linux-doc@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, mark.rutland@arm.com, ndesaulniers@google.com, ojeda@kernel.org, torvalds@linux-foundation.org Subject: Re: [PATCH 1/4] [v4] Kbuild: add -Wno-shift-negative-value where -Wextra is used In-Reply-To: <20220308215615.14183-2-arnd@kernel.org> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo References: <20220308215615.14183-1-arnd@kernel.org> <20220308215615.14183-2-arnd@kernel.org> Date: Wed, 09 Mar 2022 10:19:25 +0200 Message-ID: <87ee3b1qsy.fsf@intel.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 On Tue, 08 Mar 2022, Arnd Bergmann wrote: > From: Arnd Bergmann > > As a preparation for moving to -std=gnu11, turn off the > -Wshift-negative-value option. This warning is enabled by gcc when > building with -Wextra for c99 or higher, but not for c89. Since > the kernel already relies on well-defined overflow behavior, > the warning is not helpful and can simply be disabled in > all locations that use -Wextra. > > Signed-off-by: Arnd Bergmann Acked-by: Jani Nikula > --- > [v4] > split into a separate patch > --- > drivers/gpu/drm/i915/Makefile | 1 + > drivers/staging/greybus/tools/Makefile | 3 ++- > fs/btrfs/Makefile | 1 + > scripts/Makefile.extrawarn | 1 + > 4 files changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile > index 1b62b9f65196..1618a6e0af4e 100644 > --- a/drivers/gpu/drm/i915/Makefile > +++ b/drivers/gpu/drm/i915/Makefile > @@ -17,6 +17,7 @@ subdir-ccflags-y += -Wno-unused-parameter > subdir-ccflags-y += -Wno-type-limits > subdir-ccflags-y += -Wno-missing-field-initializers > subdir-ccflags-y += -Wno-sign-compare > +subdir-ccflags-y += -Wno-shift-negative-value > subdir-ccflags-y += $(call cc-disable-warning, unused-but-set-variable) > subdir-ccflags-y += $(call cc-disable-warning, frame-address) > subdir-ccflags-$(CONFIG_DRM_I915_WERROR) += -Werror > diff --git a/drivers/staging/greybus/tools/Makefile b/drivers/staging/greybus/tools/Makefile > index ad0ae8053b79..a3bbd73171f2 100644 > --- a/drivers/staging/greybus/tools/Makefile > +++ b/drivers/staging/greybus/tools/Makefile > @@ -12,7 +12,8 @@ CFLAGS += -std=gnu99 -Wall -Wextra -g \ > -Wredundant-decls \ > -Wcast-align \ > -Wsign-compare \ > - -Wno-missing-field-initializers > + -Wno-missing-field-initializers \ > + -Wno-shift-negative-value > > CC := $(CROSS_COMPILE)gcc > > diff --git a/fs/btrfs/Makefile b/fs/btrfs/Makefile > index 4188ba3fd8c3..99f9995670ea 100644 > --- a/fs/btrfs/Makefile > +++ b/fs/btrfs/Makefile > @@ -17,6 +17,7 @@ subdir-ccflags-y += $(condflags) > subdir-ccflags-y += -Wno-missing-field-initializers > subdir-ccflags-y += -Wno-sign-compare > subdir-ccflags-y += -Wno-type-limits > +subdir-ccflags-y += -Wno-shift-negative-value > > obj-$(CONFIG_BTRFS_FS) := btrfs.o > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > index 8be892887d71..650d0b8ceec3 100644 > --- a/scripts/Makefile.extrawarn > +++ b/scripts/Makefile.extrawarn > @@ -36,6 +36,7 @@ KBUILD_CFLAGS += $(call cc-option, -Wstringop-truncation) > KBUILD_CFLAGS += -Wno-missing-field-initializers > KBUILD_CFLAGS += -Wno-sign-compare > KBUILD_CFLAGS += -Wno-type-limits > +KBUILD_CFLAGS += -Wno-shift-negative-value > > KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN1 -- Jani Nikula, Intel Open Source Graphics Center