From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org,
Daniel Scally <djrscally@gmail.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>
Subject: Re: [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent
Date: Thu, 19 Jan 2023 11:26:53 +0200 [thread overview]
Message-ID: <Y8kM3bzIBF3dbuZh@kuha.fi.intel.com> (raw)
In-Reply-To: <20230117152120.42531-1-andriy.shevchenko@linux.intel.com>
On Tue, Jan 17, 2023 at 05:21:20PM +0200, Andy Shevchenko wrote:
> Make fwnode_graph_for_each_endpoint() consistent with the rest of
> for_each_*() definitions in the file, i.e. use the form of
>
> for (iter = func(NULL); iter; \
> iter = func(iter))
>
> as it's done in all the rest of the similar macro definitions.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
FWIW:
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> include/linux/property.h | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/include/linux/property.h b/include/linux/property.h
> index 37179e3abad5..f090419818a2 100644
> --- a/include/linux/property.h
> +++ b/include/linux/property.h
> @@ -436,9 +436,9 @@ fwnode_graph_get_endpoint_by_id(const struct fwnode_handle *fwnode,
> unsigned int fwnode_graph_get_endpoint_count(struct fwnode_handle *fwnode,
> unsigned long flags);
>
> -#define fwnode_graph_for_each_endpoint(fwnode, child) \
> - for (child = NULL; \
> - (child = fwnode_graph_get_next_endpoint(fwnode, child)); )
> +#define fwnode_graph_for_each_endpoint(fwnode, child) \
> + for (child = fwnode_graph_get_next_endpoint(fwnode, NULL); child; \
> + child = fwnode_graph_get_next_endpoint(fwnode, child))
>
> int fwnode_graph_parse_endpoint(const struct fwnode_handle *fwnode,
> struct fwnode_endpoint *endpoint);
> --
> 2.39.0
--
heikki
next prev parent reply other threads:[~2023-01-19 9:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-17 15:21 [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent Andy Shevchenko
2023-01-18 19:55 ` Rafael J. Wysocki
2023-01-19 13:36 ` Greg Kroah-Hartman
2023-01-19 9:26 ` Heikki Krogerus [this message]
2023-01-19 11:17 ` Sakari Ailus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y8kM3bzIBF3dbuZh@kuha.fi.intel.com \
--to=heikki.krogerus@linux.intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=djrscally@gmail.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox