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 8E20BCA0FF9 for ; Wed, 27 Aug 2025 01:10:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=UyaX5/mCkq3X7kd0HowaK5Hz9iSx//oGL0Ia5VMaCio=; b=4QvEMzx845dy+g WmvhOj89PfM7FT/nj0AMZfisk6jU4r0Y5IdDc7YZJtaYWLFXQ1qfBO7zn68ICI+Z9o002DJza2puZ 9tfYlQmKgKjvG7dE3xblT6Iwn4CTyp5rDCD5OadcAYra9YSOZ5/8PoAG58X+Bq19DaEA5Sp6wMiCY 1y6IOBKHytmKhmXdAeHpUM+c4wYzNOtOfCJr+jDWwd/Fpo/NAMPX3l1TrKYsLpIW9RqgW/6pFwzrp zbkfPmfS58QLaGlomqBZz8dJq7+wFLQdkUbRXyPYqDPAVJalqVFHo+VnUg2KBJjOFbJ6i3FKIer1e XZ1veKWfdyKqWXuMw98w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1ur4gL-0000000DV7Q-08z9; Wed, 27 Aug 2025 01:10:33 +0000 Received: from mail-pf1-x430.google.com ([2607:f8b0:4864:20::430]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ur4fK-0000000DUtR-1wQa; Wed, 27 Aug 2025 01:09:31 +0000 Received: by mail-pf1-x430.google.com with SMTP id d2e1a72fcca58-7718408baf7so3194118b3a.3; Tue, 26 Aug 2025 18:09:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1756256969; x=1756861769; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=rYru9aDq9lQqkQVO+bwcYPZ+KioVEL3wdcshlzZLQl8=; b=a4IOV2hr/yLXe1lhop0qz7YQkblAPpegPcwKA6Z/fyUR0KUbHBnb2RzW6WNq55qIVf mWmDnyDlj0jgpURUn/JNOZu55FybD/eRoCv8e9aZlpoCh6bdvzoI8DEzHfcaRBM+uhkS /a5zcEEy+lxNE9qhYisR/iDUtjpSOJBGxAWissbFttTcqp5hyIy54lMoXNCtSVNUQAxI K+9rTDMztE51SURM4UWNLRXx6ljy/8UYJBWiTgGVJ097r1Oiddk/5neYO9PKedt/TvG1 9iHkFUMzOjTpR4KdhbgjFSS3kptDNYQM4rDv5vt2/s1vC7piC+AzyvFITwdXjr4YIpz4 mEqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1756256969; x=1756861769; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=rYru9aDq9lQqkQVO+bwcYPZ+KioVEL3wdcshlzZLQl8=; b=oI3GP0/S04g7YLzMkjToGAWH2CRUwpeAAi6kHizqOWUtdqHQk6KLrmZeAmvSlpyLgh nTKneGt6TPLE952wraBbCvFTfg4QGuj7qkPY2QJ6sFU9HJzs3otgdPvY7ONssV+FbmgI PVAFbJupESpeItcYFIMgKnq9k8ExY+k0UEx9mWSJp6KteY6n9nW68WOW+HkrgWEWij8C 0JoPXg0wsEHMTJtcpBxDJBI/jvcmmeMk4Vcv6TG/WcUhZ185g+WbAAF9WbOKZTV3V2Dn HQgWK58Uuek1bS6YgDNifvpHgsqjAfOcU/rfbBYb4HJ8+0tVbsAuY8RmiLieHYrq6alW yEAQ== X-Forwarded-Encrypted: i=1; AJvYcCWUJsm8DWldHVOkWaKukqTQ6c3eXfwy45Ns5ZHZIPkHpQequAunEkmFFocAIs5S0g6N4lnNE4gY9GaBStIUH80=@lists.infradead.org, AJvYcCX+G4jJRvP5OnxyuZdhdXceNkePcGVBRpaUTzqsyrepshH6EnKuN4I3itnkb7m276sNHsMPRS0eKqshr5L0BIh3@lists.infradead.org, AJvYcCXxcVuvecKR2m+vXbhn/N4eFURb6zUqZN0NRvB6HDk28tWpFrqC9oilhT5EUk/ikO6jh87m6Yze623K@lists.infradead.org X-Gm-Message-State: AOJu0YzuuJS+hrEgj1/ltc/YDAjTIQWpZXks/KcJ6qco2X4QoEoa6maR HA9F9LwU24jYUSWz1ra4pOMNWXoJ2BWe8yJNiEYc5yFDyKms4tKbwDtl X-Gm-Gg: ASbGncuvp44rQ/d3Ztf0bNaetEQVzQuh6ihizLokJCThF3CdWY33YQEwDH32TxM4Ukz yxZ8QYoJqLUradMZA2UYOjBSwl/Ya+OAIThx99elY5vKzz3lk+ORqTDfFjwhVxFWFG1d7WGfAIm jo2oZzoJPQngk5AytLPdfLeygWZmghblzR09BQOwcw/r9TUp5lNmiolhwdhvGjE+KeDqenk0GLX C38uD73NBmbDYrA6ja7Xd21aJ5xb5eHcI7JW18O4u+oIK/3Dsan1Bq0u/WFmIqQjd5RFu3E1knL m3o+SIv5+6+glbLSKVvEkXX3sDsCyIaA1ZqD7tsUo4aZMySRJx+dFBoUn6KQEb/5Q2/4LcKYnU9 w3yNu8dbmklxJVXTr08DfrQ7utxwRih0g X-Google-Smtp-Source: AGHT+IHkfsVuZ+4qDUB9kGWXKNs3ixhtdzwAG20w+Ik2IkMK7IqkqBUunACMn5yLzf65+cgJRTumCw== X-Received: by 2002:a05:6a20:7286:b0:240:d7a:9591 with SMTP id adf61e73a8af0-24340d1c50amr25873828637.46.1756256969084; Tue, 26 Aug 2025 18:09:29 -0700 (PDT) Received: from localhost ([216.228.127.130]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-b4a8b7b301csm6847632a12.35.2025.08.26.18.09.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Aug 2025 18:09:28 -0700 (PDT) Date: Tue, 26 Aug 2025 21:09:26 -0400 From: Yury Norov To: Nicolas Frattaroli Cc: Rasmus Villemoes , Jaehoon Chung , Ulf Hansson , Heiko Stuebner , Shreeya Patel , Mauro Carvalho Chehab , Sandy Huang , Andy Yan , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Vinod Koul , Kishon Vijay Abraham I , Nicolas Frattaroli , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Maxime Coquelin , Alexandre Torgue , Shawn Lin , Lorenzo Pieralisi , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Chanwoo Choi , MyungJoo Ham , Kyungmin Park , Qin Jian , Michael Turquette , Stephen Boyd , Nathan Chancellor , Nick Desaulniers , Bill Wendling , Justin Stitt , kernel@collabora.com, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-phy@lists.infradead.org, linux-sound@vger.kernel.org, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-pci@vger.kernel.org, linux-pm@vger.kernel.org, linux-clk@vger.kernel.org, llvm@lists.linux.dev, Cristian Ciocaltea Subject: Re: [PATCH v3 00/20] BYEWORD_UPDATE: unifying (most) HIWORD_UPDATE macros Message-ID: References: <20250825-byeword-update-v3-0-947b841cdb29@collabora.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20250825-byeword-update-v3-0-947b841cdb29@collabora.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250826_180930_506220_CD1092D0 X-CRM114-Status: GOOD ( 32.92 ) X-BeenThere: linux-phy@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Linux Phy Mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-phy" Errors-To: linux-phy-bounces+linux-phy=archiver.kernel.org@lists.infradead.org Hi Nicolas, Thanks for the work! On Mon, Aug 25, 2025 at 10:28:20AM +0200, Nicolas Frattaroli wrote: > This series was spawned by [1], where I was asked to move every instance > of HIWORD_UPDATE et al that I could find to a common macro in the same > series that I am introducing said common macro. > > The first patch of the series introduces a new header file, > hw_bitfield.h, which contains two new macros: FIELD_PREP_WM16 and > FIELD_PREP_WM16_CONST. The latter can be used in initializers. > > I've cheekily added the hw_bitfield.h header to the BITMAP API section > of the MAINTAINERS file. > > This macro definition checks that the mask fits, and that the value fits > in the mask. Like FIELD_PREP, it also shifts the value up to the mask, > so turning off a bit does not require using the mask as a value. Masks > are also required to be contiguous, like with FIELD_PREP. > > For each definition of such a macro, the driver(s) that used it were > evaluated for three different treatments: > - full conversion to the new macro, for cases where replacing the > implementation of the old macro wouldn't have worked, or where the > conversion was trivial. These are the most complex patches in this > series, as they sometimes have to pull apart definitions of masks > and values due to the new semantics, which require a contiguous > mask and shift the value for us. > - replacing the implementation of the old macro with an instance of the > new macro, done where I felt it made the patch much easier to review > because I didn't want to drop a big diff on people. > - skipping conversion entirely, usually because the mask is > non-constant and it's not trivial to make it constant. Sometimes an > added complication is that said non-constant mask is either used in a > path where runtime overhead may not be desirable, or in an > initializer. > > Left out of conversion: > - drivers/mmc/host/sdhci-of-arasan.c: mask is non-constant. + Michal Simek > - drivers/phy/rockchip/phy-rockchip-inno-csidphy.c: mask is > non-constant likely by way of runtime pointer dereferencing, even if > struct and members are made const. + Vinod Koul (already in the list) > - drivers/clk/rockchip/clk.h: way too many clock drivers use non-const > masks in the context of an initializer. + Heiko Stuebner (already in the list) Guys, can you please take a look? Would be nice to finish the consolidation. -- I'll take #1 and the acknowledged (or at least reviewed) per-driver fixes in bitmap-for-next in 2-3 weeks before the end of cycle. Everyone, please send your tags! Nicolas, please ping me if I forget. For the rest of the series, in case of no feedback from maintainers, let's wait for one more merge window, and then move everything altogether. Thanks, Yury -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy