Commit c8c8443a authored by Vladimir Kondratiev's avatar Vladimir Kondratiev Committed by Thomas Gleixner
Browse files

irqchip/aclint-sswi: Reduce data scope

parent 93406e37
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -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;