[Skiboot] [PATCH 1/3] core/init: make fdt a local variable

Wei Yang weiyang at linux.vnet.ibm.com
Tue Dec 2 17:24:14 AEDT 2014


Currently there is a file scope variable fdt, which is just used in
load_and_boot_kernel(). Since no other user, it is not necessary to define it
as a file scope variable.

This patch makes it a local variable in the function.

Signed-off-by: Wei Yang <weiyang at linux.vnet.ibm.com>
---
 core/init.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/init.c b/core/init.c
index d8e9d20..f3d9b7e 100644
--- a/core/init.c
+++ b/core/init.c
@@ -54,7 +54,6 @@ enum proc_gen proc_gen;
 
 static uint64_t kernel_entry;
 static bool kernel_32bit;
-static void *fdt;
 
 struct debug_descriptor debug_descriptor = {
 	.eye_catcher	= "OPALdbug",
@@ -335,6 +334,7 @@ void __noreturn load_and_boot_kernel(bool is_reboot)
 {
 	const struct dt_property *memprop;
 	uint64_t mem_top;
+	void *fdt;
 
 	memprop = dt_find_property(dt_root, DT_PRIVATE "maxmem");
 	if (memprop)
-- 
1.7.9.5



More information about the Skiboot mailing list