Re: [PATCH v7 06/10] i2c: Introduce OF component probe function

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

 



On Mon, Sep 16, 2024 at 04:59:59PM +0200, Chen-Yu Tsai wrote:
> On Mon, Sep 16, 2024 at 12:36 PM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> > On Sun, Sep 15, 2024 at 12:44:13PM +0200, Chen-Yu Tsai wrote:

...

> > Hmm... I have looked into the implementation and I haven't found the evidence
> > that this is anyhow scoped. Can you point out what I have missed?
> 
> From patch 2:
> 
> +#define for_each_child_of_node_with_prefix(parent, child, prefix)      \
> +       for (struct device_node *child __free(device_node) =            \
> 
>                                  ^^^^^^^^^^^^^^^^^^^^^^^^^ scoped here
> 
> +            of_get_next_child_with_prefix(parent, NULL, prefix);       \
> +            child != NULL;                                             \
> +            child = of_get_next_child_with_prefix(parent, child, prefix))
> +
> 
> "node", or "child" in this snippet is scoped within the for loop.

Ah, nice, that's what I missed, thanks!

-- 
With Best Regards,
Andy Shevchenko






[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux