From: Lorenzo Pieralisi <lpieralisi@kernel.org>
To: Jonathan Cameron <jonathan.cameron@huawei.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>,
Robert Moore <robert.moore@intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Hanjun Guo <guohanjun@huawei.com>,
Sudeep Holla <sudeep.holla@arm.com>,
Marc Zyngier <maz@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
linux-acpi@vger.kernel.org, acpica-devel@lists.linux.dev,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH v2 3/7] irqdomain: Add parent field to struct irqchip_fwid
Date: Tue, 13 Jan 2026 12:04:57 +0100 [thread overview]
Message-ID: <aWYm2Y8yzns7n8fM@lpieralisi> (raw)
In-Reply-To: <20260107100452.00004b6f@huawei.com>
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);
> > > > }
> > >
> > >
> >
>
next prev parent reply other threads:[~2026-01-13 11:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-18 10:14 [PATCH v2 0/7] irqchip/gic-v5: Code first ACPI boot support Lorenzo Pieralisi
2025-12-18 10:14 ` [PATCH v2 1/7] ACPICA: Add GICv5 MADT structures Lorenzo Pieralisi
2025-12-18 10:14 ` [PATCH v2 2/7] ACPICA: Add Arm IORT IWB node definitions Lorenzo Pieralisi
2025-12-18 10:14 ` [PATCH v2 3/7] irqdomain: Add parent field to struct irqchip_fwid Lorenzo Pieralisi
2026-01-05 12:01 ` Jonathan Cameron
2026-01-07 8:58 ` Lorenzo Pieralisi
2026-01-07 10:04 ` Jonathan Cameron
2026-01-07 17:31 ` Lorenzo Pieralisi
2026-01-13 9:37 ` Thomas Gleixner
2026-01-13 11:04 ` Lorenzo Pieralisi [this message]
2025-12-18 10:14 ` [PATCH v2 4/7] PCI/MSI: Make the pci_msi_map_rid_ctlr_node() interface firmware agnostic Lorenzo Pieralisi
2026-01-05 12:21 ` Jonathan Cameron
2026-01-07 9:23 ` Lorenzo Pieralisi
2026-01-05 17:35 ` Bjorn Helgaas
2025-12-18 10:14 ` [PATCH v2 5/7] irqchip/gic-v5: Add ACPI IRS probing Lorenzo Pieralisi
2026-01-05 13:24 ` Jonathan Cameron
2026-01-08 16:22 ` Lorenzo Pieralisi
2025-12-18 10:14 ` [PATCH v2 6/7] irqchip/gic-v5: Add ACPI ITS probing Lorenzo Pieralisi
2026-01-05 13:55 ` Jonathan Cameron
2026-01-08 16:13 ` Lorenzo Pieralisi
2025-12-18 10:14 ` [PATCH v2 7/7] irqchip/gic-v5: Add ACPI IWB probing Lorenzo Pieralisi
2026-01-05 15:35 ` Jonathan Cameron
2026-01-08 16:12 ` Lorenzo Pieralisi
2026-01-14 15:56 ` [PATCH v2 0/7] irqchip/gic-v5: Code first ACPI boot support Rafael J. Wysocki
2026-01-14 17:03 ` Lorenzo Pieralisi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aWYm2Y8yzns7n8fM@lpieralisi \
--to=lpieralisi@kernel.org \
--cc=acpica-devel@lists.linux.dev \
--cc=bhelgaas@google.com \
--cc=guohanjun@huawei.com \
--cc=jonathan.cameron@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=maz@kernel.org \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=sudeep.holla@arm.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox