* [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
* Re: [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent
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
2 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2023-01-18 19:55 UTC (permalink / raw)
To: Andy Shevchenko
Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus,
Sakari Ailus, Greg Kroah-Hartman
On Tue, Jan 17, 2023 at 4:21 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> 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>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
and I think that you need to resend it and CC Greg (who picks up
device property patches nowadays).
> ---
> 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);
> --
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent
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 9:26 ` Heikki Krogerus
2023-01-19 11:17 ` Sakari Ailus
2 siblings, 0 replies; 5+ messages in thread
From: Heikki Krogerus @ 2023-01-19 9:26 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-acpi, linux-kernel, Daniel Scally, Sakari Ailus
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent
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 9:26 ` Heikki Krogerus
@ 2023-01-19 11:17 ` Sakari Ailus
2 siblings, 0 replies; 5+ messages in thread
From: Sakari Ailus @ 2023-01-19 11:17 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-acpi, linux-kernel, Daniel Scally, Heikki Krogerus
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>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
--
Sakari Ailus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 1/1] device property: Make fwnode_graph_for_each_endpoint() consistent
2023-01-18 19:55 ` Rafael J. Wysocki
@ 2023-01-19 13:36 ` Greg Kroah-Hartman
0 siblings, 0 replies; 5+ messages in thread
From: Greg Kroah-Hartman @ 2023-01-19 13:36 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Andy Shevchenko, linux-acpi, linux-kernel, Daniel Scally,
Heikki Krogerus, Sakari Ailus
On Wed, Jan 18, 2023 at 08:55:19PM +0100, Rafael J. Wysocki wrote:
> On Tue, Jan 17, 2023 at 4:21 PM Andy Shevchenko
> <andriy.shevchenko@linux.intel.com> 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>
>
> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> 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
^ permalink raw reply [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