From: Jiri Slaby <jirislaby@kernel.org>
To: Richard Weinberger <richard@nod.at>
Cc: maz@kernel.org, linux-kernel@vger.kernel.org,
Anton Ivanov <anton.ivanov@cambridgegreys.com>,
Johannes Berg <johannes@sipsolutions.net>,
linux-um@lists.infradead.org,
Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH v2 01/57] irqdomain: um: use irq_domain_create_linear() helper
Date: Mon, 7 Apr 2025 09:08:01 +0200 [thread overview]
Message-ID: <4b6f5678-5313-4f67-b5ea-9c4a58d5dd8d@kernel.org> (raw)
In-Reply-To: <20250319092951.37667-2-jirislaby@kernel.org>
@UM maintainers: if you have not read 00/57 [1], please route this
through your tree.
[1] https://lore.kernel.org/all/20250319092951.37667-1-jirislaby@kernel.org/
Thanks.
On 19. 03. 25, 10:28, Jiri Slaby (SUSE) wrote:
> um_pci_init() open-codes what the irq_domain_create_linear() helper
> does already. Use the helper instead of open-coding it.
>
> This needs retval checking modification.
>
> Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
> Cc: Richard Weinberger <richard@nod.at>
> Cc: Anton Ivanov <anton.ivanov@cambridgegreys.com>
> Cc: Johannes Berg <johannes@sipsolutions.net>
> Cc: linux-um@lists.infradead.org
>
> [v2]
> This is new in v2.
> ---
> arch/um/drivers/virt-pci.c | 15 +++++----------
> 1 file changed, 5 insertions(+), 10 deletions(-)
>
> diff --git a/arch/um/drivers/virt-pci.c b/arch/um/drivers/virt-pci.c
> index dd5580f975cc..efe8b474c07b 100644
> --- a/arch/um/drivers/virt-pci.c
> +++ b/arch/um/drivers/virt-pci.c
> @@ -1000,11 +1000,6 @@ static struct resource virt_platform_resource = {
>
> static int __init um_pci_init(void)
> {
> - struct irq_domain_info inner_domain_info = {
> - .size = MAX_MSI_VECTORS,
> - .hwirq_max = MAX_MSI_VECTORS,
> - .ops = &um_pci_inner_domain_ops,
> - };
> int err, i;
>
> WARN_ON(logic_iomem_add_region(&virt_cfgspace_resource,
> @@ -1030,10 +1025,10 @@ static int __init um_pci_init(void)
> goto free;
> }
>
> - inner_domain_info.fwnode = um_pci_fwnode;
> - um_pci_inner_domain = irq_domain_instantiate(&inner_domain_info);
> - if (IS_ERR(um_pci_inner_domain)) {
> - err = PTR_ERR(um_pci_inner_domain);
> + um_pci_inner_domain = irq_domain_create_linear(um_pci_fwnode, MAX_MSI_VECTORS,
> + &um_pci_inner_domain_ops, NULL);
> + if (!um_pci_inner_domain) {
> + err = -ENOMEM;
> goto free;
> }
>
> @@ -1070,7 +1065,7 @@ static int __init um_pci_init(void)
> goto free;
> return 0;
> free:
> - if (!IS_ERR_OR_NULL(um_pci_inner_domain))
> + if (um_pci_inner_domain)
> irq_domain_remove(um_pci_inner_domain);
> if (um_pci_fwnode)
> irq_domain_free_fwnode(um_pci_fwnode);
--
js
suse labs
next prev parent reply other threads:[~2025-04-07 7:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-19 9:28 [PATCH v2 00/57] irqdomain: Cleanups and Documentation Jiri Slaby (SUSE)
2025-03-19 9:28 ` [PATCH v2 01/57] irqdomain: um: use irq_domain_create_linear() helper Jiri Slaby (SUSE)
2025-04-07 7:08 ` Jiri Slaby [this message]
2025-03-19 10:21 ` [PATCH v2 00/57] irqdomain: Cleanups and Documentation Andy Shevchenko
2025-03-19 10:32 ` Jiri Slaby
2025-03-20 15:18 ` (subset) " Mark Brown
2025-03-25 7:03 ` Christophe Leroy
2025-05-06 13:41 ` Thomas Gleixner
2025-05-12 9:55 ` Jiri Slaby
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=4b6f5678-5313-4f67-b5ea-9c4a58d5dd8d@kernel.org \
--to=jirislaby@kernel.org \
--cc=anton.ivanov@cambridgegreys.com \
--cc=johannes@sipsolutions.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-um@lists.infradead.org \
--cc=maz@kernel.org \
--cc=richard@nod.at \
--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;
as well as URLs for NNTP newsgroup(s).