device property: Make fwnode_graph_for_each_endpoint() consistent
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/1 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.
--- include/linux/property.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/property.h +3 -3
@@ -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);
Signature · 1 line
2.39.0
Quoted 10 lines · Andy Shevchenko
Make
fwnode_graph_for_each_endpoint()consistent with the rest of for_each_*() definitions in the file, i.e. use the form offor (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 <[email protected]>
and I think that you need to resend it and CC Greg (who picks up device property patches nowadays).
Quoted 22 lines
--- include/linux/property.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)include/linux/property.h +3
-4@@ -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); --
Greg Kroah-Hartman
maintainerQuoted 9 lines · Rafael J. Wysocki
Quoted 7 lines · Andy Shevchenko
Make
fwnode_graph_for_each_endpoint()consistent with the rest of for_each_*() definitions in the file, i.e. use the form offor (iter = func(NULL); iter; \
iter = func(iter))
Quoted 8 lines
Quoted 3 lines
as it's done in all the rest of the similar macro definitions.
Signed-off-by Andy Shevchenko <[email protected]>and I think that you need to resend it and CC Greg (who picks up device property patches nowadays).
I can grab it from here, thanks.
greg k-h
Quoted 9 lines · Andy Shevchenko
Make
fwnode_graph_for_each_endpoint()consistent with the rest of for_each_*() definitions in the file, i.e. use the form offor (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 <[email protected]>
FWIW:
Quoted 23 lines
--- include/linux/property.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)include/linux/property.h +3
-3@@ -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);Signature · 1 line
2.39.0
Signature · 1 line
heikki
Quoted 9 lines · Andy Shevchenko
Make
fwnode_graph_for_each_endpoint()consistent with the rest of for_each_*() definitions in the file, i.e. use the form offor (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 <[email protected]>
Signature · 1 line
Sakari Ailus