[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_ftRZ98X6nYNvlK@kekkonen.localdomain>
Date: Thu, 10 Apr 2025 16:09:41 +0000
From: Sakari Ailus <sakari.ailus@...ux.intel.com>
To: Matti Vaittinen <mazziesaccount@...il.com>
Cc: Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Jonathan Cameron <jic23@...nel.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Daniel Scally <djrscally@...il.com>,
Heikki Krogerus <heikki.krogerus@...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.
>
> Signed-off-by: Matti Vaittinen <mazziesaccount@...il.com>
Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
--
Sakari Ailus
Powered by blists - more mailing lists