Re: [PATCH v3 4/8] irqchip/loongson-pch-lpc: extract non-ACPI-related code from ACPI init

From: Thomas Gleixner

Date: Fri Mar 20 2026 - 05:15:47 EST


On Sun, Mar 15 2026 at 00:28, Icenowy Zheng wrote:

> A lot of code could be shared between the current ACPI init flow with

s/could/can/ s/current/existing/

> the possible OF init flow.

s/possible/upcoming/

> Extract it to a dedicated function.

s/to/into/

> +
> +int __init pch_lpc_acpi_init(struct irq_domain *parent, struct acpi_madt_lpc_pic *acpi_pchlpc)
> +{
> + struct fwnode_handle *irq_handle;
> + struct irq_fwspec fwspec;
> + int parent_irq, ret;
> +
> + irq_handle = irq_domain_alloc_named_fwnode("lpcintc");
> + if (!irq_handle) {
> + pr_err("Unable to allocate domain handle\n");
> + return -ENOMEM;
> + }
> +
> + fwspec.fwnode = parent->fwnode;
> + fwspec.param[0] = acpi_pchlpc->cascade + GSI_MIN_PCH_IRQ;
> + fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH;
> + fwspec.param_count = 2;
> + parent_irq = irq_create_fwspec_mapping(&fwspec);
> +
> + ret = pch_lpc_init(acpi_pchlpc->address, acpi_pchlpc->size,
> + irq_handle, parent_irq);

No line break required. You have 100 characters per line.

Thanks,

tglx