[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_yvNl23GcEpOkK1@smile.fi.intel.com>
Date: Mon, 14 Apr 2025 09:46:14 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Jonathan Cameron <jic23@...nel.org>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Sakari Ailus <sakari.ailus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Danilo Krummrich <dakr@...nel.org>, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] property: Use tidy for_each_named_* macros
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.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Thanks for cleaning these up!
> ---
> The patch was crafted against the IIO/testing branch, and it depends on
> the 76125d7801e5 ("property: Add functions to iterate named child").
> Hence I'd suggest taking this via IIO tree (if this gets accepted).
I'm not sure why. The for_each_if() is part of v6.15-rc1.
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists