Thread (21 messages) 21 messages, 5 authors, 2024-09-02

Re: [PATCH v3 2/9] of: property: add of_graph_get_next_port_endpoint()

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: 2024-08-28 00:56:05
Also in: dri-devel, linux-arm-kernel, linux-devicetree, linux-media, linux-omap, linux-sound

Hi Rob
quoted
And, we still need to consider about of_fwnode_graph_get_next_endpoint()
which is the last user of of_graph_get_next_endpoint()
I missed fwnode_graph_get_next_endpoint() which has lots of users.
Though almost all of those are just "get the endpoint" and assume
there is only 1. In any case, it's a lot more than 3, so nevermind for
now.
OK, thanks.
So back to the name, I don't think we need _scoped in it. I think if
any user treats the iterator like it's the old style, the compiler is
going to complain.
quoted
For example, when user want to use the param.

        for_each_of_graph_port_endpoint(port, endpoint)
                if (xxx == yyy)
                        return endpoint;

        for_each_of_graph_port_endpoint_scoped(port, endpoint)
                if (xxx == yyy)
                        return of_node_get(endpoint)
Actually, you would do "return_ptr(endpoint)" here.
OK, nice to know about this
I will try to use this style on v4


Thank you for your help !!

Best regards
---
Kuninori Morimoto
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help