Skip to content

Commit 3d29a9a

Browse files
dtorwildea01
authored andcommitted
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>
1 parent d9ff80f commit 3d29a9a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/arm64/kernel/smp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -603,9 +603,9 @@ acpi_parse_gic_cpu_interface(struct acpi_subtable_header *header,
603603
*/
604604
static void __init of_parse_and_init_cpus(void)
605605
{
606-
struct device_node *dn = NULL;
606+
struct device_node *dn;
607607

608-
while ((dn = of_find_node_by_type(dn, "cpu"))) {
608+
for_each_node_by_type(dn, "cpu") {
609609
u64 hwid = of_get_cpu_mpidr(dn);
610610

611611
if (hwid == INVALID_HWID)

0 commit comments

Comments
 (0)