public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel•org>
To: Luca Ceresoli <luca.ceresoli@bootlin•com>
Cc: "Richard Leitner" <richard.leitner@linux•dev>,
	"Daniel Lezcano" <daniel.lezcano@linaro•org>,
	linux-pwm@vger•kernel.org, "Tony Lindgren" <tony@atomide•com>,
	"Linus Walleij" <linus.walleij@linaro•org>,
	llvm@lists•linux.dev,
	"Nicolas Ferre" <nicolas.ferre@microchip•com>,
	"Uwe Kleine-König" <ukleinek@kernel•org>,
	"Krzysztof Kozlowski" <krzk@kernel•org>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin•com>,
	linux-riscv@lists•infradead.org,
	"Jiri Slaby" <jirislaby@kernel•org>,
	linux-clk@vger•kernel.org, linux-samsung-soc@vger•kernel.org,
	"Florian Fainelli" <florian.fainelli@broadcom•com>,
	"Samuel Holland" <samuel@sholland•org>,
	"Emilio López" <emilio@elopez•com.ar>,
	"Bartosz Golaszewski" <brgl@bgdev•pl>,
	"Lee Jones" <lee@kernel•org>,
	"Jernej Skrabec" <jernej.skrabec@gmail•com>,
	linux-iio@vger•kernel.org, "Chen-Yu Tsai" <wens@csie•org>,
	"Broadcom internal kernel review list"
	<bcm-kernel-feedback-list@broadcom•com>,
	linux-serial@vger•kernel.org, "Miguel Ojeda" <ojeda@kernel•org>,
	"Michael Turquette" <mturquette@baylibre•com>,
	devicetree@vger•kernel.org,
	"Peng Fan (OSS)" <peng.fan@oss•nxp.com>,
	linux-arm-msm@vger•kernel.org, linuxppc-dev@lists•ozlabs.org,
	"Nicholas Piggin" <npiggin@gmail•com>,
	"Nathan Chancellor" <nathan@kernel•org>,
	"Naveen N. Rao" <naveen.n.rao@linux•ibm.com>,
	"Mark Brown" <broonie@kernel•org>,
	linux-sound@vger•kernel.org,
	"Thomas Gleixner" <tglx@linutronix•de>,
	linux-omap@vger•kernel.org, linux-arm-kernel@lists•infradead.org,
	"Saravana Kannan" <saravanak@google•com>,
	linux-gpio@vger•kernel.org, "Stephen Boyd" <sboyd@kernel•org>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation•org>,
	"Bjorn Andersson" <andersson@kernel•org>,
	linux-usb@vger•kernel.org, "Liam Girdwood" <lgirdwood@gmail•com>,
	linux-kernel@vger•kernel.org,
	"Damien Le Moal" <dlemoal@kernel•org>,
	"Pengutronix Kernel Team" <kernel@pengutronix•de>,
	patches@opensource•cirrus.com,
	"Christophe Leroy" <christophe.leroy@csgroup•eu>,
	"Shawn Guo" <shawnguo@kernel•org>,
	linux-sunxi@lists•linux.dev,
	"Jonathan Cameron" <jic23@kernel•org>
Subject: Re: [PATCH 00/20] Simplify of_property_for_each_u32()
Date: Wed, 3 Jul 2024 12:07:42 -0600	[thread overview]
Message-ID: <20240703180742.GB1245093-robh@kernel.org> (raw)
In-Reply-To: <20240703-of_property_for_each_u32-v1-0-42c1fc0b82aa@bootlin.com>

On Wed, Jul 03, 2024 at 12:36:44PM +0200, Luca Ceresoli wrote:
> [Note: to reduce the noise I have trimmed the get_maintainers list
> manually. Should you want to be removed, or someone else added, to future
> versions, just tell me. Sorry for the noise.]
> 
> This series aims at simplifying of_property_for_each_u32() as well as
> making it more difficult to misuse it in the future.
> 
> The long-term goal is changing this pattern:
> 
>   struct property *prop;
>   const __be32 *p;
>   u32 val;
>  
>   of_property_for_each_u32(np, "xyz", prop, p, val) { ... }
> 
> to this:
> 
>   u32 val;
> 
>   of_property_for_each_u32(np, "xyz", val) { ... }
> 
> So, removing the 3rd and 4th arguments which are typically meant to be
> internal. Those two parameters used to be unavoidable until the kernel
> moved to building with the C11 standard unconditionally. Since then, it is
> now possible to get rid of them. However a few users of
> of_property_for_each_u32() do actually use those arguments, which
> complicates the transition. For this reason this series does the following:
> 
>  * Add of_property_for_each_u32_new(), which does not have those two
>    arguments (patch 1)
>  * Convert _almost_ every usage to of_property_for_each_u32_new()
>  * Rename of_property_for_each_u32() to of_property_for_each_u32_old() and
>    deprecate it, as a incentive to code not (yet) in mainline to upgrade
>    to the *_new() version (last patch)

I don't really see the point of introducing the _old variant. Let's get 
this done in one step.

> 
> The plan for the next series is to additionally:
> 
>  * Convert the few remaining of_property_for_each_u32_old() instantes to
>    of_property_for_each_u32_new()
>  * Remove of_property_for_each_u32_old()
>  * Rename of_property_for_each_u32_new() to of_property_for_each_u32()

Honestly, I think there's few enough users we could just convert the 
whole thing in one patch. It's all got to go thru 1 tree anyways. If 
there's new cases in -next, then I'd be happy to send it to Linus at the 
end of the merge window.

Rob

  parent reply	other threads:[~2024-07-03 18:08 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03 10:36 [PATCH 00/20] Simplify of_property_for_each_u32() Luca Ceresoli
2024-07-03 10:36 ` [PATCH 01/20] of: add of_property_for_each_u32_new() Luca Ceresoli
2024-07-03 10:36 ` [PATCH 02/20] clk: convert to of_property_for_each_u32_new() Luca Ceresoli
2024-07-03 10:36 ` [PATCH 03/20] clk: qcom: " Luca Ceresoli
2024-07-03 10:36 ` [PATCH 04/20] clk: sunxi: clk-simple-gates: " Luca Ceresoli
2024-07-03 12:21   ` Andre Przywara
2024-07-03 10:36 ` [PATCH 05/20] clk: sunxi: clk-sun8i-bus-gates: " Luca Ceresoli
2024-07-03 12:19   ` Andre Przywara
2024-07-03 10:36 ` [PATCH 06/20] clocksource/drivers/samsung_pwm: " Luca Ceresoli
2024-07-03 10:36 ` [PATCH 07/20] bus: ti-sysc: " Luca Ceresoli
2024-07-03 10:36 ` [PATCH 08/20] lk: clk-conf: " Luca Ceresoli
2024-07-03 10:36 ` [PATCH 09/20] gpio: brcmstb: " Luca Ceresoli
2024-07-03 11:33   ` Bartosz Golaszewski
2024-07-03 10:36 ` [PATCH 10/20] pinctrl: s32cc: " Luca Ceresoli
2024-07-03 10:36 ` [PATCH 11/20] irqchip/atmel-aic: " Luca Ceresoli
2024-07-03 13:09   ` Nicolas Ferre
2024-07-03 10:36 ` [PATCH 12/20] iio: adc: ti_am335x_adc: " Luca Ceresoli
2024-07-03 15:34   ` Jonathan Cameron
2024-07-03 10:36 ` [PATCH 13/20] pwm: samsung: " Luca Ceresoli
2024-07-03 21:23   ` Uwe Kleine-König
2024-07-03 10:36 ` [PATCH 14/20] tty: sysrq: " Luca Ceresoli
2024-07-03 10:36 ` [PATCH 15/20] usb: usb251xb: " Luca Ceresoli
2024-07-08  7:45   ` Richard Leitner
2024-07-03 10:37 ` [PATCH 16/20] mfd: ti_am335x_tscadc: " Luca Ceresoli
2024-07-03 10:37 ` [PATCH 17/20] ASoC: arizona: " Luca Ceresoli
2024-07-03 11:31   ` Richard Fitzgerald
2024-07-03 12:18   ` Mark Brown
2024-07-03 10:37 ` [PATCH 18/20] powerpc/xive: " Luca Ceresoli
2024-07-03 10:37 ` [PATCH 19/20] " Luca Ceresoli
2024-07-03 11:36   ` Michael Ellerman
2024-07-03 10:37 ` [PATCH 20/20] of: deprecate and rename of_property_for_each_u32() Luca Ceresoli
2024-07-03 18:01   ` Rob Herring
2024-07-04 21:33     ` Luca Ceresoli
2024-07-03 18:07 ` Rob Herring [this message]
2024-07-04 21:31   ` [PATCH 00/20] Simplify of_property_for_each_u32() Luca Ceresoli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240703180742.GB1245093-robh@kernel.org \
    --to=robh@kernel$(echo .)org \
    --cc=andersson@kernel$(echo .)org \
    --cc=bcm-kernel-feedback-list@broadcom$(echo .)com \
    --cc=brgl@bgdev$(echo .)pl \
    --cc=broonie@kernel$(echo .)org \
    --cc=christophe.leroy@csgroup$(echo .)eu \
    --cc=daniel.lezcano@linaro$(echo .)org \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=dlemoal@kernel$(echo .)org \
    --cc=emilio@elopez$(echo .)com.ar \
    --cc=florian.fainelli@broadcom$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=jernej.skrabec@gmail$(echo .)com \
    --cc=jic23@kernel$(echo .)org \
    --cc=jirislaby@kernel$(echo .)org \
    --cc=kernel@pengutronix$(echo .)de \
    --cc=krzk@kernel$(echo .)org \
    --cc=lee@kernel$(echo .)org \
    --cc=lgirdwood@gmail$(echo .)com \
    --cc=linus.walleij@linaro$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-arm-msm@vger$(echo .)kernel.org \
    --cc=linux-clk@vger$(echo .)kernel.org \
    --cc=linux-gpio@vger$(echo .)kernel.org \
    --cc=linux-iio@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-omap@vger$(echo .)kernel.org \
    --cc=linux-pwm@vger$(echo .)kernel.org \
    --cc=linux-riscv@lists$(echo .)infradead.org \
    --cc=linux-samsung-soc@vger$(echo .)kernel.org \
    --cc=linux-serial@vger$(echo .)kernel.org \
    --cc=linux-sound@vger$(echo .)kernel.org \
    --cc=linux-sunxi@lists$(echo .)linux.dev \
    --cc=linux-usb@vger$(echo .)kernel.org \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=llvm@lists$(echo .)linux.dev \
    --cc=luca.ceresoli@bootlin$(echo .)com \
    --cc=mturquette@baylibre$(echo .)com \
    --cc=nathan@kernel$(echo .)org \
    --cc=naveen.n.rao@linux$(echo .)ibm.com \
    --cc=nicolas.ferre@microchip$(echo .)com \
    --cc=npiggin@gmail$(echo .)com \
    --cc=ojeda@kernel$(echo .)org \
    --cc=patches@opensource$(echo .)cirrus.com \
    --cc=peng.fan@oss$(echo .)nxp.com \
    --cc=richard.leitner@linux$(echo .)dev \
    --cc=samuel@sholland$(echo .)org \
    --cc=saravanak@google$(echo .)com \
    --cc=sboyd@kernel$(echo .)org \
    --cc=shawnguo@kernel$(echo .)org \
    --cc=tglx@linutronix$(echo .)de \
    --cc=thomas.petazzoni@bootlin$(echo .)com \
    --cc=tony@atomide$(echo .)com \
    --cc=ukleinek@kernel$(echo .)org \
    --cc=wens@csie$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox