Re: [PATCH v3 12/15] libfdt: Introduce fdt_getprop_offset_namelen()

From: Herve Codina

Date: Tue Sep 22 2026 - 12:26:57 EST


On Mon, 21 Sep 2026 16:07:21 +1000
David Gibson <david@xxxxxxxxxxxxxxxxxxxxx> wrote:

> On Wed, Aug 26, 2026 at 10:31:43AM +0200, Herve Codina wrote:
> > Future operations, such as handling unknown tags on dtb modifications,
> > need to get an offset to a property based on the node offset and the
> > property name.
> >
> > Several function exists to get a property based on the node offset
> > and the property name but none of them allows to get the property
> > offset.
> >
> > Fill the lack and introduce fdt_getprop_offset_namelen() and its
> > simple variant fdt_getprop_offset().
> >
> > Signed-off-by: Herve Codina <herve.codina@xxxxxxxxxxx>
>
> This seems redundant with fdt_ptr_offset_(), which can trivially get
> this information when combined with fdt_get_property().

Indeed, It should be ok using both functions you pointed out.

I will remove fdt_getprop_offset_namelen() introduced here and use directly
functions mentionned in the next iteration without wrapping those calls in
a new function.

Best regards,
Hervé