[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <trinity-a5696b99-bf11-4ae3-8b00-20db116f86e4-1728911450361@3c-app-webde-bs22>
Date: Mon, 14 Oct 2024 15:10:50 +0200
From: Markus Elfring <Markus.Elfring@....de>
To: Kevin Chen <kevin_chen@...eedtech.com>, linux-aspeed@...ts.ozlabs.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org
Cc: Andrew Jeffery <andrew@...econstruct.com.au>, Conor Dooley
<conor+dt@...nel.org>, Joel Stanley <joel@....id.au>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Rob Herring <robh@...nel.org>, Thomas Gleixner
<tglx@...utronix.de>, kernel-janitors@...r.kernel.org, LKML
<linux-kernel@...r.kernel.org>, BMC-SW <BMC-SW@...eedtech.com>
Subject: RE: [PATCH v3 2/2] irqchip/aspeed-intc: Add support for AST27XX
INTC
> > I propose to move selected variable definitions into corresponding compound
> > statements (by using extra curly brackets).
> > https://refactoring.com/catalog/reduceScopeOfVariable.html
> OK. I moved these two local variables into scoped_guard.
Will development interests grow for further refactorings?
> +static void aspeed_intc_ic_irq_handler(struct irq_desc *desc)
> +{
> + struct aspeed_intc_ic *intc_ic = irq_desc_get_handler_data(desc);
Another update candidate (for scope reduction)?
> +
> + guard(chained_irq)(desc);
Using another macro call “scoped_guard(…) { … }”?
> + scoped_guard(raw_spinlock, &intc_ic->gic_lock) {
Would you like to reconsider the proposed macro mixture once more?
> + unsigned long bit, status;
…
…
> +++ b/include/linux/irqchip/chained_irq.h
> @@ -38,4 +38,6 @@ static inline void chained_irq_exit(struct irq_chip *chip,
> chip->irq_unmask(&desc->irq_data);
> }
>
> +DEFINE_GUARD(chained_irq, struct irq_desc *, chained_irq_exit((_T->irq_data.chip), (_T)),
> + chained_irq_enter((_T->irq_data.chip), (_T)))
Would you like to add a #include directive in this header file accordingly?
Regards,
Markus
Powered by blists - more mailing lists