Skip to content

Commit c8c8443

Browse files
vlkondratievKAGA-KOKO
authored andcommitted
irqchip/aclint-sswi: Reduce data scope
Move variables to the innermost scope where they are used Signed-off-by: Vladimir Kondratiev <vladimir.kondratiev@mobileye.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250612143911.3224046-7-vladimir.kondratiev@mobileye.com
1 parent 93406e3 commit c8c8443

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

drivers/irqchip/irq-aclint-sswi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,18 @@ static int aclint_sswi_dying_cpu(unsigned int cpu)
6161

6262
static int __init aclint_sswi_parse_irq(struct fwnode_handle *fwnode, void __iomem *reg)
6363
{
64-
struct of_phandle_args parent;
65-
unsigned long hartid;
66-
u32 contexts, i;
67-
int rc, cpu;
64+
u32 contexts = of_irq_count(to_of_node(fwnode));
6865

69-
contexts = of_irq_count(to_of_node(fwnode));
7066
if (!(contexts)) {
7167
pr_err("%pfwP: no ACLINT SSWI context available\n", fwnode);
7268
return -EINVAL;
7369
}
7470

75-
for (i = 0; i < contexts; i++) {
71+
for (u32 i = 0; i < contexts; i++) {
72+
struct of_phandle_args parent;
73+
unsigned long hartid;
74+
int rc, cpu;
75+
7676
rc = of_irq_parse_one(to_of_node(fwnode), i, &parent);
7777
if (rc)
7878
return rc;

0 commit comments

Comments
 (0)