From: Marc Zyngier <maz@kernel.org>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pci@vger.kernel.org,
"Andrew Lunn" <andrew@lunn.ch>,
"Gregory Clement" <gregory.clement@bootlin.com>,
"Sebastian Hesselbarth" <sebastian.hesselbarth@gmail.com>,
"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
"Krzysztof Wilczyński" <kw@linux.com>,
"Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Toan Le" <toan@os.amperecomputing.com>,
"Alyssa Rosenzweig" <alyssa@rosenzweig.io>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>
Subject: Re: [PATCH v2 3/9] irqchip/gic: Convert to msi_create_parent_irq_domain() helper
Date: Fri, 16 May 2025 11:47:05 +0100 [thread overview]
Message-ID: <86cyc8g7di.wl-maz@kernel.org> (raw)
In-Reply-To: <87h61kj10o.ffs@tglx>
On Fri, 16 May 2025 11:36:07 +0100,
Thomas Gleixner <tglx@linutronix.de> wrote:
>
> On Tue, May 13 2025 at 18:28, Marc Zyngier wrote:
> > if (!v2m)
> > return 0;
> >
> > - inner_domain = irq_domain_create_hierarchy(parent, 0, 0, v2m->fwnode,
> > - &gicv2m_domain_ops, v2m);
> > + inner_domain = msi_create_parent_irq_domain(&(struct irq_domain_info){
> > + .fwnode = v2m->fwnode,
> > + .ops = &gicv2m_domain_ops,
> > + .host_data = v2m,
> > + .parent = parent,
> > + }, &gicv2m_msi_parent_ops);
> > +
>
> This really makes my eyes bleed.
>
> if (!v2m)
> return 0;
>
> - inner_domain = irq_domain_create_hierarchy(parent, 0, 0, v2m->fwnode,
> - &gicv2m_domain_ops, v2m);
> + struct irq_domain_info info = {
> + .fwnode = v2m->fwnode,
> + .ops = &gicv2m_domain_ops,
> + .host_data = v2m,
> + .parent = parent,
> + };
> +
> + inner_domain = msi_create_parent_irq_domain(&info, &gicv2m_msi_parent_ops);
>
> That's too readable, right?
>
> No need to resend, I just hacked up a few lines of coccinelle script to
> eliminate this offense.
I personally find the rework much uglier than the original contraption.
Variables declared in the middle of the code, Rust-style? Meh.
But hey, your call.
M.
--
Without deviation from the norm, progress is not possible.
next prev parent reply other threads:[~2025-05-16 10:49 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-13 17:28 [PATCH v2 0/9] irqchip: MSI parent cleanup and PCI host driver conversion Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 1/9] irqchip: Make irq-msi-lib.h globally available Marc Zyngier
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 2/9] genirq/msi: Add helper for creating MSI-parent irq domains Marc Zyngier
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 3/9] irqchip/gic: Convert to msi_create_parent_irq_domain() helper Marc Zyngier
2025-05-16 10:36 ` Thomas Gleixner
2025-05-16 10:47 ` Marc Zyngier [this message]
2025-05-16 10:55 ` Thomas Gleixner
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 4/9] irqchip/mvebu: " Marc Zyngier
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 5/9] irqchip: Drop MSI_CHIP_FLAG_SET_ACK from unsuspecting MSI drivers Marc Zyngier
2025-05-14 14:27 ` [tip: irq/urgent] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 6/9] irqchip/msi-lib: Honour the MSI_FLAG_NO_AFFINITY flag Marc Zyngier
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 7/9] PCI: apple: Convert to MSI parent infrastructure Marc Zyngier
2025-05-13 18:06 ` Alyssa Rosenzweig
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 8/9] PCI: xgene: " Marc Zyngier
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
2025-05-13 17:28 ` [PATCH v2 9/9] PCI: tegra: " Marc Zyngier
2025-05-16 19:47 ` [tip: irq/msi] " tip-bot2 for Marc Zyngier
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=86cyc8g7di.wl-maz@kernel.org \
--to=maz@kernel.org \
--cc=alyssa@rosenzweig.io \
--cc=andrew@lunn.ch \
--cc=bhelgaas@google.com \
--cc=gregory.clement@bootlin.com \
--cc=jonathanh@nvidia.com \
--cc=kw@linux.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=sebastian.hesselbarth@gmail.com \
--cc=tglx@linutronix.de \
--cc=thierry.reding@gmail.com \
--cc=toan@os.amperecomputing.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.