powerpc/ps3: move udbg_shutdown_ps3gelic prototype
authorArnd Bergmann <arnd@arndb.de>
Wed, 8 Nov 2023 12:58:38 +0000 (13:58 +0100)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 21 Nov 2023 01:06:50 +0000 (12:06 +1100)
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.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Geoff Levand <geoff@infradead.org>
Acked-by: Jakub Kicinski <kuba@kernel.org>
[mpe: Drop CONFIG_PS3GELIC_UDBG to fix build error]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231108125843.3806765-18-arnd@kernel.org
arch/powerpc/Kconfig.debug
arch/powerpc/include/asm/ps3.h
arch/powerpc/platforms/ps3/Kconfig
arch/powerpc/platforms/ps3/Makefile
arch/powerpc/platforms/ps3/gelic_udbg.c
drivers/net/ethernet/toshiba/ps3_gelic_net.h

index ea4033abc07dae53b700a100cf74272310823d6c..8c80b154e814ea5ebc5258aae394051a4b535c9a 100644 (file)
@@ -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.
index a5f36546a05240f8aa93c229f64f97caf1cb52d8..d13d8fdc3411495ba42ab75b5411ed45ed22585d 100644 (file)
@@ -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
index a44869e5ea70f8a23bac017e93ebf896a47437f9..e9c1087dd42ec68cb90e660c57b6eff0fed41ba9 100644 (file)
@@ -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
index 86bf2967a8d4a9d5f0e34b4c2fd5055a0a7017db..bc79bb124d1e7d8d47cdabe4c2f41d11772976c9 100644 (file)
@@ -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
index 6b298010fd841c24f300e3e31b8afeeb089f3057..a5202c18c236c1f51cbcb29eb34b561de1b4cbca 100644 (file)
@@ -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>
index 0d98defb011ed7976c88be928f656c634ef3c23f..0ec7412febc7bd68d278939feadc382ff4b578e8 100644 (file)
@@ -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);