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 Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux