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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EB9EC369B2 for ; Thu, 17 Apr 2025 11:17:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Type:MIME-Version: References:In-Reply-To:Subject:Cc:To:From:Message-ID:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=zWQLTGeMYrZVbdSVN7iT+V9f/EG/lT2izX+x1EmBqjA=; b=s07B4S1nTK6SF0pQmFHjy8QGx3 Q/7XHD//BvrKxVMJ4KYX1i2KqFFo99qHLg4kRruj4tDVjKWKq5KrJvuDZ/Qrpd/c9Gbn2PN1y/mdL KvNalNUccVU3+IG2iSBQslVnpb4CD7lThYqxGHSlNgkkffZUP7mIqnT9ocqJjQm5wWl19bvmeZC8c bvjKZdeyZfi5QIk/RlJ1xg+tj/WqxJbVTkxPZbCDpbl7uUeC5UQzikoltwSMrnaVB9r4p8bTP2E7L VABcIEjnx2bNfHspUozU6QKWOK4eYjDL09ZwamUaDRW9uKDLqwqPt1SfPqhrndvXwQIIvdf5yU+Az I4zyihjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u5NFB-0000000ClSu-1mJq; Thu, 17 Apr 2025 11:17:21 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u5N93-0000000Ck0n-3cJL for linux-arm-kernel@lists.infradead.org; Thu, 17 Apr 2025 11:11:01 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id 6BBCC60010; Thu, 17 Apr 2025 11:10:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DB080C4CEE7; Thu, 17 Apr 2025 11:10:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1744888258; bh=fEBqhxlmx82BtM/AlDZZ5wzx7wCNw1G9R+pxLG8DyL8=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=Zwe8MN7gY9/fyNSI6M4egF4DqTK6cOa74cIgePtVm5SxlHrH+BFGILB3SU+THyiY4 Y5zhBRJoX5lB6AJEvE2UyTUvrVAQQWJQpG5QB+/oxiv85AL6oeI7Ef3KZAX6LHi03p 3UcOsaKtnGf6MlDb9qqcOJYbWNLKJYBOa6HGAuh149UD5wQrwIa7APBHfo57SolIPz iuEmJavhra38nemTtJ9MJyy41GvkjLD3zSJpPTiuWJA+/HCIrte5XzncA7QeFyTe12 /LfO983iZHYkOPkerszOlBINL8FzDe75AdGD155w/tvxk8A1h12DUOJiYNKqGYoXsm S648FervPhCuA== Received: from sofa.misterjones.org ([185.219.108.64] helo=goblin-girl.misterjones.org) by disco-boy.misterjones.org with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1u5N8y-006ONV-Cd; Thu, 17 Apr 2025 12:10:56 +0100 Date: Thu, 17 Apr 2025 12:10:54 +0100 Message-ID: <86sem7jb5t.wl-maz@kernel.org> From: Marc Zyngier To: Luo Jie Cc: Yury Norov , Rasmus Villemoes , Julia Lawall , "Nicolas\ Palix" , Catalin Marinas , Will Deacon , Oliver Upton , Joey Gouly , Suzuki K Poulose , Zenghui Yu , , , , , , , , , , Subject: Re: [PATCH v3 0/6] Add FIELD_MODIFY() helper In-Reply-To: <20250417-field_modify-v3-0-6f7992aafcb7@quicinc.com> References: <20250417-field_modify-v3-0-6f7992aafcb7@quicinc.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/29.4 (aarch64-unknown-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-SA-Exim-Connect-IP: 185.219.108.64 X-SA-Exim-Rcpt-To: quic_luoj@quicinc.com, yury.norov@gmail.com, linux@rasmusvillemoes.dk, Julia.Lawall@inria.fr, nicolas.palix@imag.fr, catalin.marinas@arm.com, will@kernel.org, oliver.upton@linux.dev, joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com, linux-kernel@vger.kernel.org, cocci@inria.fr, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, andrew@lunn.ch, quic_kkumarcs@quicinc.com, quic_linchen@quicinc.com, quic_leiwei@quicinc.com, quic_suruchia@quicinc.com, quic_pavir@quicinc.com X-SA-Exim-Mail-From: maz@kernel.org X-SA-Exim-Scanned: No (on disco-boy.misterjones.org); SAEximRunCond expanded to false X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 17 Apr 2025 11:47:07 +0100, Luo Jie wrote: > > Add the helper FIELD_MODIFY() to the FIELD_XXX family of bitfield > macros. It is functionally similar as xxx_replace_bits(), but adds > the compile time checking to catch incorrect parameter type errors. > > This series also converts the four instances of opencoded FIELD_MODIFY() > that are found in the core kernel files, to instead use the new > FIELD_MODIFY() macro. This is achieved with Coccinelle, by adding > the script field_modify.cocci. > > The changes are validated on IPQ9574 SoC which uses ARM64 architecture. We already have the *_replace_bits() functions (see include/linux/bitfield.h). Why do we need extra helpers? M. -- Without deviation from the norm, progress is not possible.