Received: by 2002:ab2:788f:0:b0:1ee:8f2e:70ae with SMTP id b15csp14729lqi; Wed, 6 Mar 2024 08:50:01 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCXMIQv00MDjU/KPC6LZGnEPXpeqlVt2NO5SVgmdjJeSwO/WNu2TLPkjSqPm/+7tg1IbqFI9gU4FZSD2QJnzqFK7FKm4zUbVvdOGjcByrg== X-Google-Smtp-Source: AGHT+IHSzJEc93qwIq8wvzwYQgeE5wqtSdM/pq1RHO0D8PRwlL5RS8BqZMn8YKIyy1iDycD63OYZ X-Received: by 2002:a05:6a20:4722:b0:1a1:3f00:e424 with SMTP id ek34-20020a056a20472200b001a13f00e424mr4762518pzb.39.1709743800726; Wed, 06 Mar 2024 08:50:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709743800; cv=pass; d=google.com; s=arc-20160816; b=cWq3k6JsEAG47xk5MjUDG2t2Vmsf0X+FJFnmrgQf0oE/SAKXDYBXNG6l30KWBxviy6 p/um4rOeYvTseJlAn5Gzd31HWmyLxtEMCyIq+QtDOuZncIr4gY3ex9pdeNDPfxsuB7UA VVvwmw77WNBcWLcnOfEzZHQLCpEBk8keVAk9c1xBxyNMXHKaK3sspVHsR1/b3imDQlpi 5SwbfpY4/6PwfU7JPAOGJg5TFJ/YCJAImm3buD9Lqx1x5WrRqsGYbpEbvR3/zdFVrjjp U57QRaR0YJVzbzi3+zbxaCOaMnP8vQrAniJFE+iAQHgLVkJQFTZG5gvBeFonTMQf7uLn TrzQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Dm2fRgGjcZTapYKp/o6fg0mKcpHGga0kBgJ2bjAjH3I=; fh=NCch0/8zYiBfntx54v06D9B6IO/N1vz0cddjD5z4Zvk=; b=RdZyoDzi9tyjIiSRjpG5j7EIJ06KZvxBJDOOCufrxNGs1Ys0tHbPs2CQ+Vecy/ZJeW 8BC/FCROb0goXCw0GhhHbfiOluql/3+s43VhsOPOg+jLBA1aZznoAcOtod7KWruycboh g069NtfmwzWn4X5V03nN9oNKAw2r/3iD3yTV72gxQm1FPGIQylvFDZoB+oQsl2m6a9I0 LEB4dqLn/Mt8xUwZBnYbJWw98A2ypS+ZXSwRTMwysfK98xbJexCt4Jr1ttVuB2o/D0X6 BB9GO+MIR2NcwQ/8mEwDPYuppOzxPeEYP4LrvSDtjvBI0KO0DhkQe7QLNjnymeNsqoar 1PUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ugMPWBlv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94292-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id x10-20020a056a00270a00b006e4cf39bc99si11918237pfv.383.2024.03.06.08.50.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 08:50:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-94292-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ugMPWBlv; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-94292-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-94292-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 11782281DAB for ; Wed, 6 Mar 2024 16:50:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E0ACA137917; Wed, 6 Mar 2024 16:49:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ugMPWBlv" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0D9DED534; Wed, 6 Mar 2024 16:49:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709743793; cv=none; b=Sq5LokE84CjZLNIX1z32HfCgZSGxZZEEwJ0xEj5MPUYPim+hTIzvoi+RJWiN+1+8bGEWfiqbNHUJoHsAOgH22srOyd5XdUvRsfL7DLXbMRUAu7pSjU2uqJuSJ0OWTuOtYxgYWIr5BmnNDceyfRWt79PXs1KjsBr64f6TzMpABvo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709743793; c=relaxed/simple; bh=a5cu4VstVW27LKHaRhJuDngoVkzcZqWPu4EMGvK+E3M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=A2+LlTsLPSjsS5F8mHxlqWO9D9dBJkQ5143YmLZ19sbLPFud92nmyJz7QQqHnU12M/txtiUn4tHpMK0GyjLTXtG1g9L1hJD/x33JYbSkt0QlZrmZTqK8OzEBG+HNlGiiKhUvz8Kk5exvMYSvXA3r76T4AlzNnoNBwGL2v+JwJUc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ugMPWBlv; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 24C91C433C7; Wed, 6 Mar 2024 16:49:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1709743792; bh=a5cu4VstVW27LKHaRhJuDngoVkzcZqWPu4EMGvK+E3M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ugMPWBlv6jJXkUrqOliq7DDfIXiYSrhOmScAO3x+5YvN4WPVwjvMnIzNjDq5CyEsX khcZETsBdL9GKQyc1N3Vt7PuOka3S3+dpJ6sxH0PiLYlJxxPkSw79Y+Vrv7gy6fQ/+ dAzajj5ElBvfK0t/kZxAnq67J23Rvzd6y0gwr63de6SoIOLMpwzfclw3IOfsq5DBOP OodV7UC7r+d6hvZNMXbN+aeWEYM+VZ8OCiS4wNeEK2EyfFWokLOQijE8RTl+xnVXfX RAMw58RLhvIgt1QWaOuXQeyx+TNcXj4dC3GQ6xZ4un4wlJmAjyBghAmiaqzcW3n1VX //HEu2nRI2zLA== Date: Wed, 6 Mar 2024 09:49:50 -0700 From: Nathan Chancellor To: Masahiro Yamada Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Bill Wendling , Justin Stitt , Nick Desaulniers , Nicolas Schier , llvm@lists.linux.dev Subject: Re: [PATCH] kbuild: remove GCC's default -Wpacked-bitfield-compat flag Message-ID: <20240306164950.GB3659677@dev-arch.thelio-3990X> References: <20240306124709.324448-1-masahiroy@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20240306124709.324448-1-masahiroy@kernel.org> On Wed, Mar 06, 2024 at 09:47:09PM +0900, Masahiro Yamada wrote: > Commit 4a5838ad9d2d ("kbuild: Add extra gcc checks") added the > -Wpacked-bitfield-compat flag. > > GCC manual says: > "This warning is enabled by default. Use -Wno-packed-bitfield-compat > to disable this warning." > > The test code in the manual: > > struct foo > { > char a:4; > char b:8; > } __attribute__ ((packed)); > > ... emits "note: offset of packed bit-field ‘b’ has changed in GCC 4.4" > without W=3. > > Let's remove it, as it is a default with GCC. > > Clang does not support this flag, so its removal will not affect Clang > builds. > > Signed-off-by: Masahiro Yamada Reviewed-by: Nathan Chancellor > --- > > scripts/Makefile.extrawarn | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/scripts/Makefile.extrawarn b/scripts/Makefile.extrawarn > index a9e552a1e910..8192b497aae8 100644 > --- a/scripts/Makefile.extrawarn > +++ b/scripts/Makefile.extrawarn > @@ -185,7 +185,6 @@ KBUILD_CFLAGS += -Wpointer-arith > KBUILD_CFLAGS += -Wredundant-decls > KBUILD_CFLAGS += -Wsign-compare > KBUILD_CFLAGS += -Wswitch-default > -KBUILD_CFLAGS += $(call cc-option, -Wpacked-bitfield-compat) > > KBUILD_CPPFLAGS += -DKBUILD_EXTRA_WARN3 > > -- > 2.40.1 > >