sh: Fix missing prototypes (part three)
cover sh: Fix missing prototypes (part three)
Hi all,
This patch series fixes more "no previous prototype for <foo>" warnings when building a kernel for SuperH, namely when building j2_defconfig.
Thanks for your comments!
Geert Uytterhoeven (3):
sh: of-generic: Add missing #include <asm/clock.h>
sh: smp: Protect setup_profiling_timer() by CONFIG_PROFILING
sh: setup: Add missing forward declaration for sh_fdt_init()
arch/sh/boards/of-generic.c | 2 ++ arch/sh/include/asm/setup.h | 1 + arch/sh/kernel/smp.c | 2 ++ 3 files changed, 5 insertions(+)
Signature · 12 lines
2.34.1
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus TorvaldsPATCH 1/3 sh: of-generic: Add missing #include <asm/clock.h>
arch/sh/boards/of-generic.c:146:20: warning: no previous prototype for 'arch_init_clk_ops' [-Wmissing-prototypes]
--- arch/sh/boards/of-generic.c | 2 ++ 1 file changed, 2 insertions(+)
arch/sh/boards/of-generic.c +2 -0
@@ -10,6 +10,8 @@#include <linux/of_fdt.h> #include <linux/clocksource.h> #include <linux/irqchip.h> + +#include <asm/clock.h> #include <asm/machvec.h> #include <asm/rtc.h>
Signature · 1 line
2.34.1
PATCH 2/3 sh: smp: Protect setup_profiling_timer() by CONFIG_PROFILING
In reply to Geert Uytterhoevenarch/sh/kernel/smp.c:326:5: warning: no previous prototype for 'setup_profiling_timer' [-Wmissing-prototypes]
The function is unconditionally defined in smp.c, but conditionally declared in <linux/profile.h>.
--- arch/sh/kernel/smp.c | 2 ++ 1 file changed, 2 insertions(+)
arch/sh/kernel/smp.c +2 -0
@@ -322,11 +322,13 @@ void smp_message_recv(unsigned int msg) } } +#ifdef CONFIG_PROFILING /* Not really SMP stuff ... */ int setup_profiling_timer (unsigned int multiplier) {return 0 ; } +#endif #ifdef CONFIG_MMU
Signature · 1 line
2.34.1
PATCH 3/3 sh: setup: Add missing forward declaration for sh_fdt_init()
In reply to Geert Uytterhoevenarch/sh/kernel/setup.c:244:12: warning: no previous prototype for 'sh_fdt_init' [-Wmissing-prototypes]
--- arch/sh/include/asm/setup.h | 1 + 1 file changed, 1 insertion(+)
arch/sh/include/asm/setup.h +1 -0
@@ -21,5 +21,6 @@void sh_mv_setup (void );void check_for_initrd (void );void per_cpu_trap_init (void ); +void sh_fdt_init (phys_addr_t dt_phys);#endif /* _SH_SETUP_H */
Signature · 1 line
2.34.1
Hi Geert,
Quoted 12 lines · Geert Uytterhoeven
Hi all,
This patch series fixes more "no previous prototype for <foo>" warnings when building a kernel for SuperH, namely when building
j2_defconfig.Thanks for your comments!
Geert Uytterhoeven (3):
sh: of-generic: Add missing #include <asm/clock.h>
sh: smp: Protectsetup_profiling_timer()byCONFIG_PROFILING
sh: setup: Add missing forward declaration forsh_fdt_init()
Quoted 4 lines
arch/sh/boards/of-generic.c | 2 ++ arch/sh/include/asm/setup.h | 1 + arch/sh/kernel/smp.c | 2 ++ 3 files changed, 5 insertions(+)
Thanks a lot for fixing these. I have run into these as well and except for patch #2 where you found the proper fix, my proposed fixes looked exactly the same.
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913