summaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-gic-v3.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2017-10-16 15:06:23 +0200
committerAndreas Gruenbacher <agruenba@redhat.com>2017-10-16 15:06:23 +0200
commit0c9a66ec0e362fe9aff545b755430e56f58f2b96 (patch)
tree3ffc63e84133d640b9d7def9102ab62a30da460e /drivers/irqchip/irq-gic-v3.c
parentc2c4be28c248232d5bdfa5911f3b721db771f4f0 (diff)
parent9ca250a5137f3df7ffac58b49660beadd5926ace (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Diffstat (limited to 'drivers/irqchip/irq-gic-v3.c')
-rw-r--r--drivers/irqchip/irq-gic-v3.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 519149ec9053..b5df99c6f680 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1042,7 +1042,7 @@ static int get_cpu_number(struct device_node *dn)
{
const __be32 *cell;
u64 hwid;
- int i;
+ int cpu;
cell = of_get_property(dn, "reg", NULL);
if (!cell)
@@ -1056,9 +1056,9 @@ static int get_cpu_number(struct device_node *dn)
if (hwid & ~MPIDR_HWID_BITMASK)
return -1;
- for (i = 0; i < num_possible_cpus(); i++)
- if (cpu_logical_map(i) == hwid)
- return i;
+ for_each_possible_cpu(cpu)
+ if (cpu_logical_map(cpu) == hwid)
+ return cpu;
return -1;
}