[PATCH v2 1/4] irqchip/aspeed-scu-ic: Refactor driver to support variant-based initialization

Ryan Chen ryan_chen at aspeedtech.com
Wed Sep 3 20:03:22 AEST 2025


Thaks the review.

> 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.

Will update in next version.
        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_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

Thanks.
Will update

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];
}
> 
> > +	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.
Thanks, will update
> 
> > +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.
Will remove tab
> 
> Thanks,
> 
>         tglx


More information about the Linux-aspeed mailing list