Hello Ahmad, On Tue, Apr 14, 2020 at 09:29:36AM +0200, Ahmad Fatoum wrote: > Hello Sascha, > > On 4/14/20 8:46 AM, Sascha Hauer wrote: > > for_each_child_of_node() goes down to list_for_each_entry(). On an empty > > list child will point to the list head after leaving the loop. Return > > child explicitly when it's compatible and NULL when leaving the loop > > which is better readable as well. > > argh, it looked fishy to me as well, but I didn't think about comparing > Linux and barebox implementation. I just reviewed the 70 instances > of for_each_child_of_node we have and it seems only one other instance > in the overlay code has made the same assumption as I did: > - drivers/of/resolver.c: of_resolve_phandles (grep for /if (!overlay_child)/) Thanks for reporting. I sent a patch. Michael > > I can send a fixup to make it more readable but I'd want to change > for_each_child_of_node to align it with Linux behavior as well. > > Cheers > Ahmad _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox