Skip to contentSkip to conversation

MIPS: Alchemy: Fix missing prototypes

PATCH Applied Florian Fainelli 2 participants 2 messages Jan 17, 2024 – Jan 22, 2024 MIPS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: Alchemy: Fix missing prototypes

We have a number of missing prototypes warnings for board_setup(), alchemy_set_lpj() and prom_init_cmdline(), prom_getenv() and prom_get_ethernet_addr(). Fix those by providing definitions for the first two functions in au1000.h which is included everywhere relevant, and including prom.h for the last three.

---
 arch/mips/alchemy/common/prom.c            | 1 +
 arch/mips/alchemy/common/setup.c           | 4 +---
 arch/mips/include/asm/mach-au1x00/au1000.h | 3 +++
 3 files changed, 5 insertions(+), 3 deletions(-)
arch/mips/alchemy/common/prom.c +1 -0
index b13d8adf3be4..20d30f6265cd 100644
@@ -40,6 +40,7 @@
 #include <linux/string.h>
 
 #include <asm/bootinfo.h>
+#include <prom.h>
 
 int prom_argc;
 char **prom_argv;
arch/mips/alchemy/common/setup.c +1 -3
index 2388d68786f4..a7a6d31a7a41 100644
@@ -30,13 +30,11 @@
 #include <linux/mm.h>
 #include <linux/dma-map-ops.h> /* for dma_default_coherent */
 
+#include <asm/bootinfo.h>
 #include <asm/mipsregs.h>
 
 #include <au1000.h>
 
-extern void __init board_setup(void);
-extern void __init alchemy_set_lpj(void);
-
 static bool alchemy_dma_coherent(void)
 {
 	switch (alchemy_get_cputype()) {
arch/mips/include/asm/mach-au1x00/au1000.h +3 -0
index a7eec3364a64..41546777902b 100644
@@ -597,6 +597,9 @@
 
 #include <asm/cpu.h>
 
+void alchemy_set_lpj(void);
+void board_setup(void);
+
 /* helpers to access the SYS_* registers */
 static inline unsigned long alchemy_rdsys(int regofs)
 {
Signature · 1 line
2.34.1
maintainer Applied
#1 lore raw
Quoted 6 lines · Florian Fainelli

We have a number of missing prototypes warnings for board_setup(), alchemy_set_lpj() and prom_init_cmdline(), prom_getenv() and prom_get_ethernet_addr(). Fix those by providing definitions for the first two functions in au1000.h which is included everywhere relevant, and including prom.h for the last three.

Quoted 6 lines
---
 arch/mips/alchemy/common/prom.c            | 1 +
 arch/mips/alchemy/common/setup.c           | 4 +---
 arch/mips/include/asm/mach-au1x00/au1000.h | 3 +++
 3 files changed, 5 insertions(+), 3 deletions(-)

applied to mips-fixes.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]