Hi Peng, On Sat, May 4, 2024 at 3:14 PM Peng Fan (OSS) <peng.fan@xxxxxxxxxxx> wrote: > From: Peng Fan <peng.fan@xxxxxxx> > > Use scope based of_node_put() cleanup to simplify code. > > Signed-off-by: Peng Fan <peng.fan@xxxxxxx> Thanks for your patch! Reviewed-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> Acked-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx> > --- a/drivers/pinctrl/renesas/pinctrl-rzn1.c > +++ b/drivers/pinctrl/renesas/pinctrl-rzn1.c You missed one trivial conversion, presumably because no error handling and thus no of_node_put() is involved? @@ -737,13 +737,12 @@ static int rzn1_pinctrl_parse_groups(struct device_node *np, static int rzn1_pinctrl_count_function_groups(struct device_node *np) { - struct device_node *child; int count = 0; if (of_property_count_u32_elems(np, RZN1_PINS_PROP) > 0) count++; - for_each_child_of_node(np, child) { + for_each_child_of_node_scoped(np, child) { if (of_property_count_u32_elems(child, RZN1_PINS_PROP) > 0) count++; } If you prefer not to include this, I will send a small patch myself later. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds