[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1646895012-3143-2-git-send-email-yangtiezhu@loongson.cn>
Date: Thu, 10 Mar 2022 14:50:10 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: Thomas Bogendoerfer <tsbogend@...ha.franken.de>
Cc: Xuefeng Li <lixuefeng@...ngson.cn>, linux-mips@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH 1/3] MIPS: Remove redundant check in device_tree_init()
In device_tree_init(), unflatten_and_copy_device_tree() checks
initial_boot_params, so remove the redundant check.
drivers/of/fdt.c
void __init unflatten_and_copy_device_tree(void)
{
int size;
void *dt;
if (!initial_boot_params) {
pr_warn("No valid device tree found, continuing without\n");
return;
}
...
}
Signed-off-by: Tiezhu Yang <yangtiezhu@...ngson.cn>
---
arch/mips/loongson64/setup.c | 3 ---
arch/mips/pic32/pic32mzda/init.c | 3 ---
2 files changed, 6 deletions(-)
diff --git a/arch/mips/loongson64/setup.c b/arch/mips/loongson64/setup.c
index 6fe3fff..1973eb0 100644
--- a/arch/mips/loongson64/setup.c
+++ b/arch/mips/loongson64/setup.c
@@ -39,8 +39,5 @@ void __init plat_mem_setup(void)
void __init device_tree_init(void)
{
- if (!initial_boot_params)
- return;
-
unflatten_and_copy_device_tree();
}
diff --git a/arch/mips/pic32/pic32mzda/init.c b/arch/mips/pic32/pic32mzda/init.c
index 764f2d0..a1860f2 100644
--- a/arch/mips/pic32/pic32mzda/init.c
+++ b/arch/mips/pic32/pic32mzda/init.c
@@ -80,9 +80,6 @@ void __init prom_init(void)
void __init device_tree_init(void)
{
- if (!initial_boot_params)
- return;
-
unflatten_and_copy_device_tree();
}
--
2.1.0
Powered by blists - more mailing lists