[PATCH u-boot-dm v2] fdt_support: Add fdt_for_each_node_by_compatible() helper macro
Marek Behún
kabel at kernel.org
Tue Jan 18 15:16:31 CET 2022
On Tue, 18 Jan 2022 14:28:17 +0100
Stefan Roese <sr at denx.de> wrote:
> Hi Marek,
>
> On 1/10/22 11:46, Marek Behún wrote:
> > From: Marek Behún <marek.behun at nic.cz>
> >
> > Add macro fdt_for_each_node_by_compatible() to allow iterating over
> > fdt nodes by compatible string.
> >
> > Convert various usages of
> > off = fdt_node_offset_by_compatible(fdt, start, compat);
> > while (off > 0) {
> > code();
> > off = fdt_node_offset_by_compatible(fdt, off, compat);
> > }
> > and similar, to
> > fdt_for_each_node_by_compatible(off, fdt, start, compat)
> > code();
> >
> > Signed-off-by: Marek Behún <marek.behun at nic.cz>
> > Reviewed-by: Stefan Roese <sr at denx.de>
>
> Apart from some merge issues, which I solved while appying, I'm seeing
> multiple problems with world building in CI / Azure. For example:
>
> $ make turris_mox_defconfig
> $ make -s -j20
> drivers/phy/marvell/comphy_a3700.c: In function
> 'find_available_node_by_compatible':
> drivers/phy/marvell/comphy_a3700.c:988:9: warning: implicit declaration
> of function 'fdt_for_each_node_by_compatible'; did you mean
> 'find_available_node_by_compatible'? [-Wimplicit-function-declaration]
> 988 | fdt_for_each_node_by_compatible(offset, gd->fdt_blob,
> offset,
> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> | find_available_node_by_compatible
> drivers/phy/marvell/comphy_a3700.c:989:52: error: expected ';' before 'if'
> 989 | compatible)
> | ^
> | ;
> 990 | if (fdtdec_get_is_enabled(gd->fdt_blob, offset))
> | ~~
> make[3]: *** [scripts/Makefile.build:254:
> drivers/phy/marvell/comphy_a3700.o] Error 1
> make[2]: *** [scripts/Makefile.build:394: drivers/phy/marvell] Error 2
> make[1]: *** [scripts/Makefile.build:394: drivers/phy] Error 2
> make[1]: *** Waiting for unfinished jobs....
> make: *** [Makefile:1889: drivers] Error 2
> make: *** Waiting for unfinished jobs....
>
> Could you please take a look and re-submit once this passes a world
> CI build? Or did I miss to apply some other patch before this one?
I sent v3 where I fixed compilation for various targets. Seems that
github's CI does not do all the tests anymore, and so didn't catch
them, otherwise I don't know how this could have happend.
There is one merge issue with Tom's master branch. I explained how to
resolve it in v3 after commit text.
Marek
More information about the U-Boot
mailing list