public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent
@ 2023-01-17 15:21 Andy Shevchenko
  2023-01-18 19:55 ` Rafael J. Wysocki
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andy Shevchenko @ 2023-01-17 15:21 UTC (permalink / raw)
  To: Andy Shevchenko, linux-acpi, linux-kernel
  Cc: Daniel Scally, Heikki Krogerus, Sakari Ailus

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>
---
 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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-01-19 13:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2023-01-19 11:17 ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox