From: Dmitry Torokhov Date: Wed, 1 Feb 2017 23:01:05 +0000 (-0800) Subject: arm64: make use of for_each_node_by_type() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3d29a9a0f88300b7ccb642ebee61b331ef0a8c27;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Signed-off-by: Will Deacon --- 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)