Re: [RFC PATCH 12/15] libfdt: Handle unknown tags in fdt_get_next()

From: Luca Ceresoli

Date: Wed Apr 01 2026 - 11:25:14 EST


On Tue Feb 10, 2026 at 6:33 PM CET, Herve Codina wrote:
> The structured tag value definition introduced recently gives the
> ability to ignore unknown tags without any error when they are read.
>
> libfdt uses fdt_get_next() to get a tag.

I think you mean fdt_next_tag(), here and elsewhere in the commit message.

>
> Filtering out tags that should be ignored in fdt_get_next() allows to
> have the filtering done globally and allows, in future release, to have
^
releases

> a central place to add new known tags that should not be filtered out.
>
> An already known tag exists with the meaning of "just ignore". This tag
> is FDT_NOP. fdt_get_next() callers already handle the FDT_NOP tag.
>
> Avoid unneeded modification at callers side and use a fake FDT_NOP tag
> when an unknown tag that should be ignored is encountered.
>
> Add also fdt_get_next_() internal function for callers who need to know

And here fdt_next_tag_()?

> if the FDT_NOP tag returned is a real FDT_NOP or a fake FDT_NOP due to
> an unknown tag.
>
> Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>

Looks good otherwise, so with those fixed:
Reviewed-by: Luca Ceresoli <luca.ceresoli@xxxxxxxxxxx>

--
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com