Skip to content

Commit

Permalink
arm64: make use of for_each_node_by_type()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dmitry Torokhov authored and Will Deacon committed Feb 2, 2017
1 parent d9ff80f commit 3d29a9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions arch/arm64/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 3d29a9a

Please sign in to comment.