diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-02-02 02:01:05 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-02-02 21:19:27 +0300 |
commit | 3d29a9a0f88300b7ccb642ebee61b331ef0a8c27 (patch) | |
tree | 318a5976a8c4cb16d02ad3aff1ae31c851ed1cbd /arch | |
parent | d9ff80f83ecbf4cbdf56d32d01c312498e4fb1cd (diff) | |
download | linux-3d29a9a0f88300b7ccb642ebee61b331ef0a8c27.tar.xz |
arm64: make use of for_each_node_by_type()
Instead of open-coding the loop, let's use canned macro.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/kernel/smp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm64/kernel/smp.c b/arch/arm64/kernel/smp.c index cb87234cfcf2..a8ec5da530af 100644 --- a/arch/arm64/kernel/smp.c +++ b/arch/arm64/kernel/smp.c @@ -603,9 +603,9 @@ acpi_parse_gic_cpu_interface(struct acpi_subtable_header *header, */ static void __init of_parse_and_init_cpus(void) { - struct device_node *dn = NULL; + struct device_node *dn; - while ((dn = of_find_node_by_type(dn, "cpu"))) { + for_each_node_by_type(dn, "cpu") { u64 hwid = of_get_cpu_mpidr(dn); if (hwid == INVALID_HWID) |