[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87v7ggfnby.ffs@tglx>
Date: Sun, 01 Feb 2026 17:19:45 +0100
From: Thomas Gleixner <tglx@...nel.org>
To: Icenowy Zheng <zhengxingda@...as.ac.cn>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Huacai Chen <chenhuacai@...nel.org>, Jiaxun Yang <jiaxun.yang@...goat.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-mips@...r.kernel.org, Icenowy Zheng <zhengxingda@...as.ac.cn>
Subject: Re: [PATCH 5/8] irqchip/loongson-pch-lpc: add OF init code
On Sat, Jan 31 2026 at 17:45, Icenowy Zheng wrote:
> As the (kernel-internally) OF-based MIPS Loongson-3 systems can also
What are kernel-internally systems?
> have PCH LPC interrupt controller, add OF-based initialization code for
have a ... controller.
Add OF ....
> +#ifdef CONFIG_OF
> +static int pch_lpc_of_init(struct device_node *node,
> + struct device_node *parent)
No line break required.
> +{
> + int parent_irq;
> + struct fwnode_handle *irq_handle;
> + struct resource res;
Variable ordering.
> + if (of_address_to_resource(node, 0, &res))
> + return -EINVAL;
> +
> + parent_irq = irq_of_parse_and_map(node, 0);
> + if (!parent_irq) {
> + pr_err("Failed to get the parent IRQ for LPC IRQs\n");
> + return -EINVAL;
> + }
> +
> + irq_handle = of_fwnode_handle(node);
> +
> + return pch_lpc_init(res.start, resource_size(&res), irq_handle,
> + parent_irq);
If pch_lpc_init() fails the parent interrupt mapping is leaked, no?
Thanks,
tglx
Powered by blists - more mailing lists