[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZuhNLuNvwXWjqRqT@smile.fi.intel.com>
Date: Mon, 16 Sep 2024 18:22:22 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Chen-Yu Tsai <wenst@...omium.org>
Cc: Rob Herring <robh@...nel.org>, Saravana Kannan <saravanak@...gle.com>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Wolfram Sang <wsa@...nel.org>, Benson Leung <bleung@...omium.org>,
Tzung-Bi Shih <tzungbi@...nel.org>, Mark Brown <broonie@...nel.org>,
Liam Girdwood <lgirdwood@...il.com>,
chrome-platform@...ts.linux.dev, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
Douglas Anderson <dianders@...omium.org>,
Johan Hovold <johan@...nel.org>, Jiri Kosina <jikos@...nel.org>,
linux-i2c@...r.kernel.org
Subject: Re: [PATCH v7 06/10] i2c: Introduce OF component probe function
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@...ux.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
Powered by blists - more mailing lists