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