Re: [PATCH] property: Use tidy for_each_named_* macros

From: Sakari Ailus
Date: Thu Apr 10 2025 - 12:09:57 EST


On Thu, Apr 10, 2025 at 02:52:00PM +0300, Matti Vaittinen wrote:
> Implementing if-conditions inside for_each_x() macros requires some
> thinking to avoid side effects in the calling code. Resulting code
> may look somewhat awkward, and there are couple of different ways it is
> usually done.
>
> Standardizing this to one way can help making it more obvious for a code
> reader and writer. The newly added for_each_if() is a way to achieve this.
>
> Use for_each_if() to make these macros look like many others which
> should in the long run help reading the code.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@xxxxxxxxx>

Acked-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>

--
Sakari Ailus