Merge tag 'riscv-for-linus-5.20-mw0' of git://git.kernel.org/pub/scm/linux/kernel...
[platform/kernel/linux-starfive.git] / drivers / irqchip / irq-sifive-plic.c
index ba49381..2f47848 100644 (file)
@@ -374,7 +374,8 @@ static int __init __plic_init(struct device_node *node,
        for (i = 0; i < nr_contexts; i++) {
                struct of_phandle_args parent;
                irq_hw_number_t hwirq;
-               int cpu, hartid;
+               int cpu;
+               unsigned long hartid;
 
                if (of_irq_parse_one(node, i, &parent)) {
                        pr_err("failed to parse parent for context %d.\n", i);
@@ -398,8 +399,8 @@ static int __init __plic_init(struct device_node *node,
                        continue;
                }
 
-               hartid = riscv_of_parent_hartid(parent.np);
-               if (hartid < 0) {
+               error = riscv_of_parent_hartid(parent.np, &hartid);
+               if (error < 0) {
                        pr_warn("failed to parse hart ID for context %d.\n", i);
                        continue;
                }