diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-01-17 18:21:20 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-19 16:39:04 +0300 |
commit | 52af7863508e94f3e05e43a3f2f3943a71dcffab (patch) | |
tree | e463c3c209d21c29a81d2e29b414194bc4a1eddf /include/linux/property.h | |
parent | ed9f918174cb35ba51d2fc86a613305dd8bc4cfe (diff) | |
download | linux-52af7863508e94f3e05e43a3f2f3943a71dcffab.tar.xz |
device property: Make fwnode_graph_for_each_endpoint() consistent
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>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20230117152120.42531-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/property.h')
-rw-r--r-- | include/linux/property.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/property.h b/include/linux/property.h index 1ffd4f9bb67b..0a29db15ff34 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); |