[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <871pop2etv.ffs@tglx>
Date: Tue, 02 Sep 2025 14:56:12 +0200
From: Thomas Gleixner <tglx@...utronix.de>
To: Ryan Chen <ryan_chen@...eedtech.com>, ryan_chen
<ryan_chen@...eedtech.com>, Eddie James <eajames@...ux.ibm.com>, Rob
Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor
Dooley <conor+dt@...nel.org>, Joel Stanley <joel@....id.au>, Andrew
Jeffery <andrew@...econstruct.com.au>, Lee Jones <lee@...nel.org>,
linux-aspeed@...ts.ozlabs.org, linux-kernel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v2 1/4] irqchip/aspeed-scu-ic: Refactor driver to
support variant-based initialization
On Sun, Aug 31 2025 at 10:14, Ryan Chen wrote:
> scu_ic->irq_domain = irq_domain_create_linear(of_fwnode_handle(node), scu_ic->num_irqs,
> - &aspeed_scu_ic_domain_ops,
> - scu_ic);
> + &aspeed_scu_ic_domain_ops,
> + scu_ic);
Please move scu_ic to the previous line.
> +aspeed_scu_ic_find_variant(struct device_node *np)
> {
> - struct aspeed_scu_ic *scu_ic = kzalloc(sizeof(*scu_ic), GFP_KERNEL);
> -
> - if (!scu_ic)
> - return -ENOMEM;
> + for (int i = 0; i < ARRAY_SIZE(scu_ic_variants); i++)
> + if (of_device_is_compatible(np, scu_ic_variants[i].compatible))
> + return &scu_ic_variants[i];
the for loop wants curly brackets.
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#bracket-rules
> + scu_ic->irq_enable = variant->irq_enable;
> + scu_ic->irq_shift = variant->irq_shift;
> + scu_ic->num_irqs = variant->num_irqs;
Please use a TAB not spaces when you want to align things.
> +IRQCHIP_DECLARE(ast2600_scu_ic0, "aspeed,ast2600-scu-ic0", aspeed_scu_ic_of_init);
> +IRQCHIP_DECLARE(ast2600_scu_ic1, "aspeed,ast2600-scu-ic1", aspeed_scu_ic_of_init);
Stray TAB in the last line.
Thanks,
tglx
Powered by blists - more mailing lists