Message ID | 20231108125843.3806765-18-arnd@kernel.org |
---|---|
State | New |
Headers | show |
Series | -Wmissing-prototype warning fixes | expand |
Hi Arnd, On 11/8/23 12:58, Arnd Bergmann wrote: > From: Arnd Bergmann <arnd@arndb.de> > > 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> > --- > arch/powerpc/include/asm/ps3.h | 6 ++++++ > arch/powerpc/platforms/ps3/gelic_udbg.c | 1 + > drivers/net/ethernet/toshiba/ps3_gelic_net.h | 6 ------ > 3 files changed, 7 insertions(+), 6 deletions(-) Seems good to me. I'll test it next chance I get. Signed-off-by: Geoff Levand <geoff@infradead.org>
On Wed, 8 Nov 2023 14:18:09 +0000 Geoff Levand wrote: > Seems good to me. I'll test it next chance I get. > > Signed-off-by: Geoff Levand <geoff@infradead.org> Seems like this is best routed via powerpc: Acked-by: Jakub Kicinski <kuba@kernel.org>
diff --git a/arch/powerpc/include/asm/ps3.h b/arch/powerpc/include/asm/ps3.h index a5f36546a052..d13d8fdc3411 100644 --- a/arch/powerpc/include/asm/ps3.h +++ b/arch/powerpc/include/asm/ps3.h @@ -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 diff --git a/arch/powerpc/platforms/ps3/gelic_udbg.c b/arch/powerpc/platforms/ps3/gelic_udbg.c index 6b298010fd84..a5202c18c236 100644 --- a/arch/powerpc/platforms/ps3/gelic_udbg.c +++ b/arch/powerpc/platforms/ps3/gelic_udbg.c @@ -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> diff --git a/drivers/net/ethernet/toshiba/ps3_gelic_net.h b/drivers/net/ethernet/toshiba/ps3_gelic_net.h index 0d98defb011e..0ec7412febc7 100644 --- a/drivers/net/ethernet/toshiba/ps3_gelic_net.h +++ b/drivers/net/ethernet/toshiba/ps3_gelic_net.h @@ -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);