Re: [RFC PATCH 12/15] libfdt: Handle unknown tags in fdt_get_next()
Herve Codina <[email protected]> Tue, 7 Apr 2026 16:29:52 +0200
| Newsgroups | org.kernel.vger.devicetree-spec,org.kernel.vger.devicetree-compiler,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Organization | Bootlin |
| Message-ID | <[email protected]> |
Hi Luca, On Wed, 01 Apr 2026 17:17:46 +0200 "Luca Ceresoli" <[email protected]> wrote: > 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_()? > You're perfectly right. fdt_next_tag() and fdt_next_tag_() are the correct functions. This will be fixed in the next iteration as well as the commit title (same issue) and the 'release' typo. Best regards, Hervé