[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aXCWKf_hvdPsMNKL@zatzit>
Date: Wed, 21 Jan 2026 20:02:33 +1100
From: David Gibson <david@...son.dropbear.id.au>
To: Herve Codina <herve.codina@...tlin.com>
Cc: Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Ayush Singh <ayush@...gleboard.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>,
devicetree-compiler@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree-spec@...r.kernel.org,
Hui Pu <hui.pu@...ealthcare.com>,
Ian Ray <ian.ray@...ealthcare.com>,
Luca Ceresoli <luca.ceresoli@...tlin.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [RFC PATCH 46/77] dtc: Introduce dti_get_marker_label()
On Mon, Jan 19, 2026 at 05:02:40PM +0100, Herve Codina wrote:
> On Thu, 15 Jan 2026 17:51:30 +1100
> David Gibson <david@...son.dropbear.id.au> wrote:
>
> > On Mon, Jan 12, 2026 at 03:19:36PM +0100, Herve Codina wrote:
> > > The future introduction of orphan nodes for addons device-tree will lead
> > > to more than one tree in the addons data. Those trees will be:
> > > - the classical root tree starting at the root node
> > > - trees related to orphan nodes
> > >
> > > Also, an addon device-tree can have only trees based on orphan nodes. In
> > > other words an addon device-tree is valid without having the classical
> > > 'root' tree.
> > >
> > > To prepare this change, introduce and use dti_get_marker_label().
> > >
> > > dti_get_marker_label() retrieves a marker and its related node and
> > > property based on the label value. It behaves in the same way as
> > > get_marker_label() but it works at the struct dt_info level.
> > >
> > > It handles the case where a 'root' device-tree is not present and will
> > > handle orphan nodes trees as soon as they will be introduced.
> > >
> > > This introduction doesn't lead to any functional changes.
> >
> > For all of these functions, if the new one is basically replacing the
> > old one, don't change the name, just change the signature.
>
> The old function is kept an used internally (move to static).
> It is not a simple replacement.
It's a replacement in the sense that all the existing callers are
moving to the new function.
> When I introduce orphan node later on, those dti_xxxx() functions call
> the old function multiple times. One call for the root tree and other calls
> for orphan trees.
> But anyway, If you prefer keeping the old name with a new signature,
> I can do the following:
> - move function_name() to __function_name()
> - Update the function_name() signature and call __function_name().
That's a better plan. Except don't use __function_name(). _ prefixed
names are reserved for the C library. Use a _ suffix instead
(e.g. see fdt_get_property_by_offset_()).
--
David Gibson (he or they) | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you, not the other way
| around.
http://www.ozlabs.org/~dgibson
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists