[U-Boot] [PATCH v2 6/8] dm: core: Mirror the chosen node parse logic in the livetree scanning

Simon Glass sjg at chromium.org
Thu Oct 11 02:01:41 UTC 2018


On 7 October 2018 at 04:01, Bin Meng <bmeng.cn at gmail.com> wrote:
> Commit f2006808f099: ("dm: core: parse chosen node") added a logic
> to parse the chosen node during dm_scan_fdt_node(), but unfortunately
> it missed adding the same logic in dm_scan_fdt_live(). This mirrors
> the logic in the livetree version.
>
> The weird thing is that commit f2006808f099 did update the test case
> to test such logic, but I have no idea how the test case could pass.
>
> With this fix, the following 2 test cases now pass:
>
> Test: dm_test_bus_children: bus.c
> test/dm/bus.c:112, dm_test_bus_children(): num_devices ==
> list_count_items(&uc->dev_head): Expected 7, got 6
>
> Test: dm_test_fdt: test-fdt.c
> test/dm/test-fdt.c:184, dm_test_fdt(): num_devices ==
> list_count_items(&uc->dev_head): Expected 7, got 6
>
> Fixes: f2006808f099 ("dm: core: parse chosen node")
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
> Changes in v2: None
>
>  drivers/core/root.c | 10 ++++++++++
>  1 file changed, 10 insertions(+)

I actually don't see that failure. Something odd is going on. Anyway
this looks right to me.

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list