Skip to contentSkip to conversation

powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.

PATCH Applied Michael Ellerman 2 participants 4 messages Mar 5, 2024 – Mar 13, 2024

Subsystems (2)
lore
Share & tools
lore

Michael Ellerman

author reviewer
#0 lore raw

PATCH 1/3 powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.

Move the prototypes into mpc10x.h which is included by all the relevant C files, fixes:

arch/powerpc/platforms/embedded6xx/ls_uart.c:59:6: error: no previous prototype for 'avr_uart_configure' arch/powerpc/platforms/embedded6xx/ls_uart.c:82:6: error: no previous prototype for 'avr_uart_send'

---
 arch/powerpc/platforms/embedded6xx/linkstation.c | 3 ---
 arch/powerpc/platforms/embedded6xx/mpc10x.h      | 3 +++
 2 files changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/platforms/embedded6xx/linkstation.c +0 -3
index 9c10aac40c7b..e265f026eee2 100644
@@ -99,9 +99,6 @@ static void __init linkstation_init_IRQ(void)
 	mpic_init(mpic);
 }
 
-extern void avr_uart_configure(void);
-extern void avr_uart_send(const char);
-
 static void __noreturn linkstation_restart(char *cmd)
 {
 	local_irq_disable();
arch/powerpc/platforms/embedded6xx/mpc10x.h +3 -0
index 5ad12023e562..ebc258fa4858 100644
@@ -156,4 +156,7 @@ int mpc10x_disable_store_gathering(struct pci_controller *hose);
 /* For MPC107 boards that use the built-in openpic */
 void mpc10x_set_openpic(void);
 
+void avr_uart_configure(void);
+void avr_uart_send(const char c);
+
 #endif	/* __PPC_KERNEL_MPC10X_H */
Signature · 1 line
2.43.2
author reviewer
#1 lore raw

PATCH 2/3 powerpc/amigaone: Make several functions static

These functions can all be static. Make them so. That also fixes no previous prototype warnings:

arch/powerpc/platforms/amigaone/setup.c:28:6: error: no previous prototype for 'amigaone_show_cpuinfo' arch/powerpc/platforms/amigaone/setup.c:68:13: error: no previous prototype for 'amigaone_setup_arch' arch/powerpc/platforms/amigaone/setup.c:86:13: error: no previous prototype for 'amigaone_init_IRQ' arch/powerpc/platforms/amigaone/setup.c:126:17: error: no previous prototype for 'amigaone_restart'

---
 arch/powerpc/platforms/amigaone/setup.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/powerpc/platforms/amigaone/setup.c +4 -4
index 6c6e714a7521..2c8dc0886912 100644
@@ -25,7 +25,7 @@
 
 extern void __flush_disable_L1(void);
 
-void amigaone_show_cpuinfo(struct seq_file *m)
+static void amigaone_show_cpuinfo(struct seq_file *m)
 {
 	seq_printf(m, "vendor\t\t: Eyetech Ltd.\n");
 }
@@ -65,7 +65,7 @@ static int __init amigaone_add_bridge(struct device_node *dev)
 	return 0;
 }
 
-void __init amigaone_setup_arch(void)
+static void __init amigaone_setup_arch(void)
 {
 	if (ppc_md.progress)
 		ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0);
@@ -83,7 +83,7 @@ static void __init amigaone_discover_phbs(void)
 	BUG_ON(phb != 0);
 }
 
-void __init amigaone_init_IRQ(void)
+static void __init amigaone_init_IRQ(void)
 {
 	struct device_node *pic, *np = NULL;
 	const unsigned long *prop = NULL;
@@ -123,7 +123,7 @@ static int __init request_isa_regions(void)
 }
 machine_device_initcall(amigaone, request_isa_regions);
 
-void __noreturn amigaone_restart(char *cmd)
+static void __noreturn amigaone_restart(char *cmd)
 {
 	local_irq_disable();
 
Signature · 1 line
2.43.2
author reviewer
#2 lore raw

PATCH 3/3 powerpc/4xx: Fix warp_gpio_leds build failure

In reply to Michael Ellerman

The 44x/warp_defconfig build fails with:

arch/powerpc/platforms/44x/warp.c:109:15: error: variable ‘warp_gpio_leds’ has initializer but incomplete type

    109 | static struct platform_device warp_gpio_leds = {
        |               ^~~~~~~~~~~~~~~

Fix it by including platform_device.h.

Fixes ef175b29a242 ("of: Stop circularly including of_device.h and of_platform.h")
---
 arch/powerpc/platforms/44x/warp.c | 1 +
 1 file changed, 1 insertion(+)
arch/powerpc/platforms/44x/warp.c +1 -0
index bf0188dcb918..a5001d32f978 100644
@@ -8,6 +8,7 @@
 #include <linux/err.h>
 #include <linux/init.h>
 #include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/kthread.h>
 #include <linux/leds.h>
 #include <linux/i2c.h>
Signature · 1 line
2.43.2
#3 lore raw
In reply to Michael Ellerman
Quoted 8 lines · Michael Ellerman

Move the prototypes into mpc10x.h which is included by all the relevant C files, fixes:

arch/powerpc/platforms/embedded6xx/ls_uart.c:59:6: error: no previous prototype for 'avr_uart_configure' arch/powerpc/platforms/embedded6xx/ls_uart.c:82:6: error: no previous prototype for 'avr_uart_send'

[...]

Applied to powerpc/next.

[1/3] powerpc/embedded6xx: Fix no previous prototype for avr_uart_send() etc.

      https://git.kernel.org/powerpc/c/20933531be0577cdd782216858c26150dbc7936f
[2/3] powerpc/amigaone: Make several functions static
      https://git.kernel.org/powerpc/c/e8b1ce0e287fd1493334f3435d763aecd517afd9
[3/3] powerpc/4xx: Fix warp_gpio_leds build failure
      https://git.kernel.org/powerpc/c/5b9e00a6004cf837c43fdb8d5290df619de78024

cheers