2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 09:43:59 +08:00

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>
This commit is contained in:
Dmitry Torokhov 2017-02-01 15:01:05 -08:00 committed by Will Deacon
parent d9ff80f83e
commit 3d29a9a0f8

View File

@ -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)