[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aWYm2Y8yzns7n8fM@lpieralisi>
Date: Tue, 13 Jan 2026 12:04:57 +0100
From: Lorenzo Pieralisi <lpieralisi@...nel.org>
To: Jonathan Cameron <jonathan.cameron@...wei.com>
Cc: "Rafael J. Wysocki" <rafael@...nel.org>, Len Brown <lenb@...nel.org>,
Robert Moore <robert.moore@...el.com>,
Thomas Gleixner <tglx@...utronix.de>,
Hanjun Guo <guohanjun@...wei.com>,
Sudeep Holla <sudeep.holla@....com>, Marc Zyngier <maz@...nel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>, linux-acpi@...r.kernel.org,
acpica-devel@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH v2 3/7] irqdomain: Add parent field to struct irqchip_fwid
On Wed, Jan 07, 2026 at 10:04:52AM +0000, Jonathan Cameron wrote:
[...]
> > > > +static inline
> > > > +struct fwnode_handle *irq_domain_alloc_named_fwnode_parent(const char *name,
> > > > + struct fwnode_handle *parent)
> > >
> > > The name of this makes me think it's allocating the named fwnode parent, rather that
> > > the named fwnode + setting it's parent.
> > >
> > > There aren't all that many calls to irq_domain_named_fwnode(), maybe to avoid challenge
> > > of a new name, just add the parameter to all of them? (25ish) Mind you the current
> > > pattern for similar cases is a helper, so maybe not.
> >
> > Similar cases ? Have you got anything specific I can look into ?
>
> I meant all the different irq_domain_alloc_xxxxx variants that call
> __irq_domain_alloc_fwnode() with a subset of parameters set to NULL.
>
> That seems to say there is a precedence for making the presence of the parameter
> part of the name rather than requiring callers to set the ones they don't want to
> NULL. So it argues for a helper like this one just for consistency.
>
> >
> > > Or go with something similar to named and have
> > >
> > > irq_domain_alloc_named_parented_fwnode()?
Right, given that Thomas is fine with it, I will go with this suggestion then
albeit it is getting a bit cumbersome (_named_id_parented_fwnode..), it should
be fine and I can rework the code to add a parent field to the existing interface
later if we feel it is nicer.
Thanks,
Lorenzo
> >
> > Or I can add a set_parent() helper (though that's a bit of churn IMO) ?
> >
> > If Thomas has a preference I will follow that, all of the above is doable
> > for me.
>
> Agreed. Let's see what Thomas prefers (i.e. make the decision his problem ;)
>
> Jonathan
>
> >
> > > I'm not that bothered though if you think the current naming is the best we can do.
> >
> > I think you have a point - as per my comment above.
> >
> > Thanks,
> > Lorenzo
> >
> > > Jonathan
> > >
> > > > +{
> > > > + return __irq_domain_alloc_fwnode(IRQCHIP_FWNODE_NAMED, 0, name, NULL, parent);
> > > > }
> > >
> > >
> >
>
Powered by blists - more mailing lists