powerpc: Make code compilable with -Wmissing-prototypes
PATCH 1/1 powerpc: Make code compilable with -Wmissing-prototypes
It's always better to check whether the implementations match the prototypes, so make the code compilable with the -Wmissing-prototypes compiler flag. (However, the flag is not turned on yet since the other architectures are not ready for this yet)
Signed-off-by Thomas Huth <[email protected]>
--- lib/powerpc/asm/setup.h | 2 ++ lib/powerpc/hcall.c | 2 ++ lib/powerpc/io.c | 3 ++- lib/powerpc/io.h | 8 ++++++++ lib/powerpc/setup.c | 2 +- powerpc/reloc64.c | 2 ++ 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 lib/powerpc/io.h
lib/powerpc/asm/setup.h +2 -0
@@ -27,4 +27,6 @@ extern unsigned __icache_bytes, __dcache_bytes;#define PHYSICAL_START (__physical_start)#define PHYSICAL_END (__physical_end) +void setup (const void *fdt); +#endif /* _ASMPOWERPC_SETUP_H_ */
lib/powerpc/hcall.c +2 -0
@@ -9,6 +9,8 @@* This work is licensed under the terms of the GNU LGPL, version 2. */ #include <asm/hcall.h> +#include <libcflat.h> +#include "io.h" int hcall_have_broken_sc1 (void ) {
lib/powerpc/io.c +2 -1
@@ -8,9 +8,10 @@#include <libcflat.h> #include <asm/spinlock.h> #include <asm/rtas.h> +#include <asm/setup.h> +#include "io.h" extern void halt (int code); -extern void putchar (int c);static struct spinlock print_lock;
lib/powerpc/io.h new file +8 -0
@@ -0,0 +1,8 @@ +/* +* Prototypes for io.c +* +* This work is licensed under the terms of the GNU GPL, version 2. +*/ + +extern void io_init (void ); +extern void putchar (int c);
lib/powerpc/setup.c +1 -1
@@ -19,9 +19,9 @@#include <asm/setup.h> #include <asm/page.h> #include <asm/hcall.h> +#include "io.h" extern unsigned long stacktop; -extern void io_init (void );char *initrd;u32 initrd_size;
powerpc/reloc64.c +2 -0
@@ -24,6 +24,8 @@ struct elf64_rela {signed long long addend; }; +void relocate (unsigned long load_addr,struct elf64_dyn *dyn_table); +void relocate (unsigned long load_addr,struct elf64_dyn *dyn_table) {unsigned long long rela_addr =0 , rela_count =0 , *addr;
Signature · 1 line
1.8.3.1
Quoted 6 lines · Thomas Huth
It's always better to check whether the implementations match the prototypes, so make the code compilable with the -Wmissing-prototypes compiler flag. (However, the flag is not turned on yet since the other architectures are not ready for this yet)
Signed-off-by Thomas Huth <[email protected]>
Quoted 9 lines
--- lib/powerpc/asm/setup.h | 2 ++ lib/powerpc/hcall.c | 2 ++ lib/powerpc/io.c | 3 ++- lib/powerpc/io.h | 8 ++++++++ lib/powerpc/setup.c | 2 +- powerpc/reloc64.c | 2 ++ 6 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 lib/powerpc/io.h
Reviewed-by Laurent Vivier <[email protected]>