RE: [PATCH v2 07/20] pinctrl: renesas: Use scope based of_node_put() cleanups

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Subject: Re: [PATCH v2 07/20] pinctrl: renesas: Use scope based
> of_node_put() cleanups
> 
> 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?

You are right.

> 
> @@ -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.

I would not add it.
If no major comments in this patchset, I will not do a v3. So, please do that
with your follow up patch.

Thanks,
Peng.

> 
> Gr{oetje,eeting}s,
> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
> 
> 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





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux