[PATCH 13/22] OF: base: import parent/child functions from Linux OF API

Sebastian Hesselbarth sebastian.hesselbarth at gmail.com
Tue Jun 18 16:34:36 EDT 2013


On 06/18/2013 10:29 PM, Sascha Hauer wrote:
> On Tue, Jun 18, 2013 at 07:29:58PM +0200, Sebastian Hesselbarth wrote:
>> This imports of_get_parent, of_get_next_child, of_get_next_available_child,
>> and of_get_child_by_name and corresponding helpers from Linux OF API.
>>
>> Signed-off-by: Sebastian Hesselbarth<sebastian.hesselbarth at gmail.com>
>> ---
[...]
>> +#define for_each_child_of_node(parent, child) \
>> +	for (child = of_get_next_child(parent, NULL); child != NULL; \
>> +	     child = of_get_next_child(parent, child))
>
> Why don't we just rename the original list iteration #define?
>
> I think we shouldn't generate worse code just for the sake of being in
> sync with Linux.

Agree, reworking this will take some days as I will not be able to
get back to it soon. Rebasing that 22 patches beast is time-consuming ;)

> I wonder why the Linux implementation doesn't use the Linux list
> implementation...

Maybe you should also raise that question on devtree-discuss?

Sebastian



More information about the barebox mailing list