Thread (35 messages) 35 messages, 11 authors, 2024-07-08

Re: [PATCH 15/20] usb: usb251xb: convert to of_property_for_each_u32_new()

From: Richard Leitner <hidden>
Date: 2024-07-08 07:45:48
Also in: linux-arm-msm, linux-clk, linux-devicetree, linux-gpio, linux-iio, linux-omap, linux-pwm, linux-riscv, linux-samsung-soc, linux-serial, linux-sound, linux-sunxi, linux-usb, lkml, llvm

Hi Luca,

On Wed, Jul 03, 2024 at 12:36:59PM GMT, Luca Ceresoli wrote:
Simplify code using of_property_for_each_u32_new() as the two additional
parameters in of_property_for_each_u32() are not used here.

Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
please feel free to add:

Acked-by: Richard Leitner <redacted>
quoted hunk ↗ jump to hunk
---
 drivers/usb/misc/usb251xb.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/usb/misc/usb251xb.c b/drivers/usb/misc/usb251xb.c
index 7da404f55a6d..490004dbb9d8 100644
--- a/drivers/usb/misc/usb251xb.c
+++ b/drivers/usb/misc/usb251xb.c
@@ -382,11 +382,9 @@ static void usb251xb_get_ports_field(struct usb251xb *hub,
 				    bool ds_only, u8 *fld)
 {
 	struct device *dev = hub->dev;
-	struct property *prop;
-	const __be32 *p;
 	u32 port;
 
-	of_property_for_each_u32(dev->of_node, prop_name, prop, p, port) {
+	of_property_for_each_u32_new(dev->of_node, prop_name, port) {
 		if ((port >= ds_only ? 1 : 0) && (port <= port_cnt))
 			*fld |= BIT(port);
 		else
-- 
2.34.1
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help