Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-30 Thread James Clark
On 29/05/2024 01:40, Laurent Pinchart wrote: > Hi Morimoto-san, > > Thank you for the patch. > > On Tue, May 28, 2024 at 11:55:32PM +, Kuninori Morimoto wrote: >> We already have for_each_endpoint_of_node(), don't use >> of_graph_get_next_endpoint() directly. Replace it. >> >> Signed-off-b

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Kuninori Morimoto
Hi Dan > Someone should create for_each_endpoint_of_node_scoped(). > > #define for_each_endpoint_of_node_scoped(parent, child) \ > for (struct device_node *child __free(device_node) = \ > of_graph_get_next_endpoint(parent, NULL); child != NULL; \ > c

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Laurent Pinchart
On Wed, May 29, 2024 at 06:19:33PM +0300, Dan Carpenter wrote: > On Wed, May 29, 2024 at 05:52:53PM +0300, Laurent Pinchart wrote: > > On Wed, May 29, 2024 at 05:34:41PM +0300, Dan Carpenter wrote: > > > On Wed, May 29, 2024 at 03:40:47AM +0300, Laurent Pinchart wrote: > > > > > @@ -286,7 +286,7 @@

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Dan Carpenter
On Wed, May 29, 2024 at 05:52:53PM +0300, Laurent Pinchart wrote: > On Wed, May 29, 2024 at 05:34:41PM +0300, Dan Carpenter wrote: > > On Wed, May 29, 2024 at 03:40:47AM +0300, Laurent Pinchart wrote: > > > > @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct > > > > device *dev,

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Laurent Pinchart
On Wed, May 29, 2024 at 05:34:41PM +0300, Dan Carpenter wrote: > On Wed, May 29, 2024 at 03:40:47AM +0300, Laurent Pinchart wrote: > > > @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct > > > device *dev, > > > } > > > > > > /* Iterate through each output port to discover

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-29 Thread Dan Carpenter
On Wed, May 29, 2024 at 03:40:47AM +0300, Laurent Pinchart wrote: > > @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device > > *dev, > > } > > > > /* Iterate through each output port to discover topology */ > > - while ((ep = of_graph_get_next_endpoint(parent, ep

Re: [PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-28 Thread Laurent Pinchart
Hi Morimoto-san, Thank you for the patch. On Tue, May 28, 2024 at 11:55:32PM +, Kuninori Morimoto wrote: > We already have for_each_endpoint_of_node(), don't use > of_graph_get_next_endpoint() directly. Replace it. > > Signed-off-by: Kuninori Morimoto > Reviewed-by: Suzuki K Poulose > ---

[PATCH v2 resend 2/8] hwtracing: use for_each_endpoint_of_node()

2024-05-28 Thread Kuninori Morimoto
We already have for_each_endpoint_of_node(), don't use of_graph_get_next_endpoint() directly. Replace it. Signed-off-by: Kuninori Morimoto Reviewed-by: Suzuki K Poulose --- drivers/hwtracing/coresight/coresight-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/d