Commit b47e9c62 authored by Paul Burton's avatar Paul Burton Committed by Ralf Baechle

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: default avatarPaul 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: default avatarRalf Baechle <ralf@linux-mips.org>
parent c59435a6
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/of_fdt.h> #include <linux/of_fdt.h>
#include <linux/of_platform.h> #include <linux/of_platform.h>
#include <asm/bootinfo.h>
#include <asm/fw/fw.h> #include <asm/fw/fw.h>
#include <asm/irq_cpu.h> #include <asm/irq_cpu.h>
#include <asm/machine.h> #include <asm/machine.h>
...@@ -88,6 +89,8 @@ void __init *plat_get_fdt(void) ...@@ -88,6 +89,8 @@ void __init *plat_get_fdt(void)
return (void *)fdt; return (void *)fdt;
} }
#ifdef CONFIG_RELOCATABLE
void __init plat_fdt_relocated(void *new_location) void __init plat_fdt_relocated(void *new_location)
{ {
/* /*
...@@ -101,6 +104,8 @@ void __init plat_fdt_relocated(void *new_location) ...@@ -101,6 +104,8 @@ void __init plat_fdt_relocated(void *new_location)
fw_arg1 = (unsigned long)new_location; fw_arg1 = (unsigned long)new_location;
} }
#endif /* CONFIG_RELOCATABLE */
void __init plat_mem_setup(void) void __init plat_mem_setup(void)
{ {
if (mach && mach->fixup_fdt) if (mach && mach->fixup_fdt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment