[PATCH v7 06/10] i2c: Introduce OF component probe function
Andy Shevchenko
andriy.shevchenko at linux.intel.com
Mon Sep 16 08:22:22 PDT 2024
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 at linux.intel.com> 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
More information about the Linux-mediatek
mailing list