summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-08-23 14:17:44 -0400
committerRalf Baechle <ralf@linux-mips.org>2017-08-29 09:21:54 -0400
commitb47e9c62f2312066df5719cfc3a6104bf854071a (patch)
tree20152ab2be2694e347b82d49a4532d45f21ef074
parentc59435a617a7c442d5253e42c351135672417803 (diff)
MIPS: generic: Include asm/bootinfo.h for plat_fdt_relocated()
arch/mips/generic/init.c provides an implementation of the plat_fdt_relocated() function, but doesn't include the asm/bootinfo.h header which declares it. This leads to a warning from sparse: arch/mips/generic/init.c:94:13: warning: symbol 'plat_fdt_relocated' was not declared. Should it be static? Fix this by including asm/bootinfo.h to get the declaration of plat_fdt_relocated(). We also #ifdef our definition of plat_fdt_relocated() such that it is only provided when CONFIG_RELOCATABLE is set, matching the header & avoiding the redundant function for non-relocatable kernels. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: linux-mips@linux-mips.org Cc: trivial@kernel.org Patchwork: https://patchwork.linux-mips.org/patch/17166/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r--arch/mips/generic/init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/mips/generic/init.c b/arch/mips/generic/init.c
index 3f32b376d30e..15a7fb8e2a2e 100644
--- a/arch/mips/generic/init.c
+++ b/arch/mips/generic/init.c
@@ -16,6 +16,7 @@
16#include <linux/of_fdt.h> 16#include <linux/of_fdt.h>
17#include <linux/of_platform.h> 17#include <linux/of_platform.h>
18 18
19#include <asm/bootinfo.h>
19#include <asm/fw/fw.h> 20#include <asm/fw/fw.h>
20#include <asm/irq_cpu.h> 21#include <asm/irq_cpu.h>
21#include <asm/machine.h> 22#include <asm/machine.h>
@@ -88,6 +89,8 @@ void __init *plat_get_fdt(void)
88 return (void *)fdt; 89 return (void *)fdt;
89} 90}
90 91
92#ifdef CONFIG_RELOCATABLE
93
91void __init plat_fdt_relocated(void *new_location) 94void __init plat_fdt_relocated(void *new_location)
92{ 95{
93 /* 96 /*
@@ -101,6 +104,8 @@ void __init plat_fdt_relocated(void *new_location)
101 fw_arg1 = (unsigned long)new_location; 104 fw_arg1 = (unsigned long)new_location;
102} 105}
103 106
107#endif /* CONFIG_RELOCATABLE */
108
104void __init plat_mem_setup(void) 109void __init plat_mem_setup(void)
105{ 110{
106 if (mach && mach->fixup_fdt) 111 if (mach && mach->fixup_fdt)