powerpc: -Wmissing-prototypes fixes
Subsystems (5)
v2 cover powerpc: -Wmissing-prototypes fixes
From: Arnd Bergmann <[email protected]>
Most of the other fixes I sent have been picked up in other trees in linux-next already, but I saw the powerpc ones were still missing.
I've folded the fixup for the ps3gelic patch in, the other two patches are unchanged. Please apply, or ignore if you already have them in some tree.
Arnd
Arnd Bergmann (3):
powerpc: ps3: move udbg_shutdown_ps3gelic prototype
powerpc: pasemi: mark pas_shutdown() static
powerpc: powermac: mark smp_psurge_{give,take}_timebase static
arch/powerpc/Kconfig.debug | 1 - arch/powerpc/include/asm/ps3.h | 6 ++++++ arch/powerpc/platforms/pasemi/setup.c | 2 +- arch/powerpc/platforms/powermac/smp.c | 4 ++-- arch/powerpc/platforms/ps3/Kconfig | 12 ------------ arch/powerpc/platforms/ps3/Makefile | 2 +- arch/powerpc/platforms/ps3/gelic_udbg.c | 1 + drivers/net/ethernet/toshiba/ps3_gelic_net.h | 6 ------ 8 files changed, 11 insertions(+), 23 deletions(-)
Signature · 7 lines
2.39.2 Cc: Michael Ellerman <[email protected]> Cc: Nicholas Piggin <[email protected]> Cc: Christophe Leroy <[email protected]> Cc: [email protected] Cc: [email protected]
PATCH v2 1/3 powerpc: ps3: move udbg_shutdown_ps3gelic prototype
From: Arnd Bergmann <[email protected]>
Allmodconfig kernels produce a missing-prototypes warning:
arch/powerpc/platforms/ps3/gelic_udbg.c:239:6: error: no previous prototype for 'udbg_shutdown_ps3gelic' [-Werror=missing-prototypes]
Move the declaration from a local header to asm/ps3.h where it can be seen from both the caller and the definition. As suggested by Michael Ellerman, remove the CONFIG_PS3GELIC_UDBG option to prevent this from causing a build regression.
--- arch/powerpc/Kconfig.debug | 1 - arch/powerpc/include/asm/ps3.h | 6 ++++++ arch/powerpc/platforms/ps3/Kconfig | 12 ------------ arch/powerpc/platforms/ps3/Makefile | 2 +- arch/powerpc/platforms/ps3/gelic_udbg.c | 1 + drivers/net/ethernet/toshiba/ps3_gelic_net.h | 6 ------ 6 files changed, 8 insertions(+), 20 deletions(-)
arch/powerpc/Kconfig.debug +0 -1
@@ -271,7 +271,6 @@ config PPC_EARLY_DEBUG_USBGECKO config PPC_EARLY_DEBUG_PS3GELIC bool "Early debugging through the PS3 Ethernet port" depends on PPC_PS3 - select PS3GELIC_UDBG help Select this to enable early debugging for the PlayStation3 via UDP broadcasts sent out through the Ethernet port.
arch/powerpc/include/asm/ps3.h +6 -0
@@ -514,4 +514,10 @@ u64 ps3_get_spe_id(void *arg);void ps3_early_mm_init (void ); +#ifdef CONFIG_PPC_EARLY_DEBUG_PS3GELIC +void udbg_shutdown_ps3gelic (void ); +#else +static inline void udbg_shutdown_ps3gelic (void ) {} +#endif +#endif
arch/powerpc/platforms/ps3/Kconfig +0 -12
@@ -167,16 +167,4 @@ config PS3_LPM profiling support of the Cell processor with programs like perfmon2, then say Y or M, otherwise say N. -config PS3GELIC_UDBG - bool "PS3 udbg output via UDP broadcasts on Ethernet" - depends on PPC_PS3 - help - Enables udbg early debugging output by sending broadcast UDP - via the Ethernet port (UDP port number 18194). - - This driver uses a trivial implementation and is independent - from the main PS3 gelic network driver. - - If in doubt, say N here. - endmenu
arch/powerpc/platforms/ps3/Makefile +1 -1
@@ -3,7 +3,7 @@ obj-y += setup.o mm.o time.o hvcall.o htab.o repository.o obj-y += interrupt.o exports.o os-area.o obj-y += system-bus.o -obj-$(CONFIG_PS3GELIC_UDBG) += gelic_udbg.o +obj-$(CONFIG_PPC_EARLY_DEBUG_PS3GELIC) += gelic_udbg.o obj-$(CONFIG_SMP) += smp.o obj-$(CONFIG_SPU_BASE) += spu.o obj-y += device-init.o
arch/powerpc/platforms/ps3/gelic_udbg.c +1 -0
@@ -14,6 +14,7 @@#include <linux/ip.h> #include <linux/udp.h> +#include <asm/ps3.h> #include <asm/io.h> #include <asm/udbg.h> #include <asm/lv1call.h>
drivers/net/ethernet/toshiba/ps3_gelic_net.h +0 -6
@@ -346,12 +346,6 @@ static inline void *port_priv(struct gelic_port *port)return port->priv; } -#ifdef CONFIG_PPC_EARLY_DEBUG_PS3GELIC -void udbg_shutdown_ps3gelic (void ); -#else -static inline void udbg_shutdown_ps3gelic (void ) {} -#endif -int gelic_card_set_irq_mask (struct gelic_card *card,u64 mask);/* shared netdev ops */ void gelic_card_up (struct gelic_card *card);
Signature · 1 line
2.39.2
PATCH v2 2/3 powerpc: pasemi: mark pas_shutdown() static
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
Allmodconfig builds show a warning about one function that is accidentally marked global:
arch/powerpc/platforms/pasemi/setup.c:67:6: error: no previous prototype for 'pas_shutdown' [-Werror=missing-prototypes]
--- arch/powerpc/platforms/pasemi/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/platforms/pasemi/setup.c +1 -1
@@ -64,7 +64,7 @@ static void __noreturn pas_restart(char *cmd) }#ifdef CONFIG_PPC_PASEMI_NEMO -void pas_shutdown (void ) +static void pas_shutdown (void ) {/* Set the PLD bit that makes the SB600 think the power button is being pressed */ void __iomem *pld_map =ioremap (0xf5000000 ,4096 );
Signature · 1 line
2.39.2
PATCH v2 3/3 powerpc: powermac: mark smp_psurge_{give,take}_timebase static
In reply to Arnd BergmannFrom: Arnd Bergmann <[email protected]>
These functions are only called locally and should be static like the other corresponding functions are:
arch/powerpc/platforms/powermac/smp.c:416:13: error: no previous prototype for 'smp_psurge_take_timebase' [-Werror=missing-prototypes]
416 | void __init smp_psurge_take_timebase(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/powermac/smp.c:432:13: error: no previous prototype for 'smp_psurge_give_timebase' [-Werror=missing-prototypes]
432 | void __init smp_psurge_give_timebase(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~--- arch/powerpc/platforms/powermac/smp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/platforms/powermac/smp.c +2 -2
@@ -413,7 +413,7 @@ static void __init smp_psurge_setup_cpu(int cpu_nr)printk (KERN_ERR "Couldn't get primary IPI interrupt" ); } -void __init smp_psurge_take_timebase (void ) +static void __init smp_psurge_take_timebase (void ) {if (psurge_type !=PSURGE_DUAL )return ;
@@ -429,7 +429,7 @@ void __init smp_psurge_take_timebase(void)set_dec (tb_ticks_per_jiffy/2 ); } -void __init smp_psurge_give_timebase (void ) +static void __init smp_psurge_give_timebase (void ) {/* Nothing to do here */ }
Signature · 1 line
2.39.2