[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <175094718542.406.17103367903859471912.tip-bot2@tip-bot2>
Date: Thu, 26 Jun 2025 14:13:05 -0000
From: "tip-bot2 for Vladimir Kondratiev" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>,
Thomas Gleixner <tglx@...utronix.de>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: irq/drivers] irqchip/aclint-sswi: Reduce data scope
The following commit has been merged into the irq/drivers branch of tip:
Commit-ID: c8c8443a64a186df0508c709d51fe9c7db0b5d55
Gitweb: https://git.kernel.org/tip/c8c8443a64a186df0508c709d51fe9c7db0b5d55
Author: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
AuthorDate: Thu, 12 Jun 2025 17:39:10 +03:00
Committer: Thomas Gleixner <tglx@...utronix.de>
CommitterDate: Thu, 26 Jun 2025 16:06:40 +02:00
irqchip/aclint-sswi: Reduce data scope
Move variables to the innermost scope where they are used
Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@...ileye.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Link: https://lore.kernel.org/all/20250612143911.3224046-7-vladimir.kondratiev@mobileye.com
---
drivers/irqchip/irq-aclint-sswi.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-aclint-sswi.c b/drivers/irqchip/irq-aclint-sswi.c
index d9f28c0..9d8b19b 100644
--- a/drivers/irqchip/irq-aclint-sswi.c
+++ b/drivers/irqchip/irq-aclint-sswi.c
@@ -61,18 +61,18 @@ static int aclint_sswi_dying_cpu(unsigned int cpu)
static int __init aclint_sswi_parse_irq(struct fwnode_handle *fwnode, void __iomem *reg)
{
- struct of_phandle_args parent;
- unsigned long hartid;
- u32 contexts, i;
- int rc, cpu;
+ u32 contexts = of_irq_count(to_of_node(fwnode));
- contexts = of_irq_count(to_of_node(fwnode));
if (!(contexts)) {
pr_err("%pfwP: no ACLINT SSWI context available\n", fwnode);
return -EINVAL;
}
- for (i = 0; i < contexts; i++) {
+ for (u32 i = 0; i < contexts; i++) {
+ struct of_phandle_args parent;
+ unsigned long hartid;
+ int rc, cpu;
+
rc = of_irq_parse_one(to_of_node(fwnode), i, &parent);
if (rc)
return rc;
Powered by blists - more mailing lists