Skip to contentSkip to conversation

MIPS: BCM63XX: Fix missing prototypes

PATCH Superseded Florian Fainelli 2 participants 2 messages Jan 23, 2024 MIPS

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 MIPS: BCM63XX: Fix missing prototypes

We have a number of missing prototypes warnings for the BCM63XX machine, fix those by providing adequate function prototypes.

---
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h    | 8 ++++++++
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h  | 1 +
 arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 ++
 arch/mips/include/asm/mach-bcm63xx/irq.h            | 3 +++
 4 files changed, 14 insertions(+)
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +8 -0
index 1cad18e6681d..b9ab5ee1c7b2 100644
@@ -1065,4 +1065,12 @@ void bcm63xx_machine_halt(void);
 
 void bcm63xx_machine_reboot(void);
 
+int bcm63xx_register_devices(void);
+
+int bcm63xx_rng_register(void);
+
+int bcm63xx_uart_register(unsigned int id);
+
+int bcm63xx_wdt_register(void);
+
 #endif /* !BCM63XX_CPU_H_ */
arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h +1 -0
index bcbece793fd8..f920c7274f5e 100644
@@ -8,5 +8,6 @@ int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us);
 int bcm63xx_timer_enable(int id);
 int bcm63xx_timer_disable(int id);
 unsigned int bcm63xx_timer_countdown(unsigned int countdown_us);
+int bcm63xx_timer_init(void);
 
 #endif /* !BCM63XX_TIMER_H_ */
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +2 -0
index 830f53f28e3f..7b905c8a424d 100644
@@ -51,4 +51,6 @@ struct board_info {
 	unsigned long ephy_reset_gpio_flags;
 };
 
+int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out);
+
 #endif /* ! BOARD_BCM963XX_H_ */
arch/mips/include/asm/mach-bcm63xx/irq.h +3 -0
index b016f0615d5f..cbb92a609835 100644
@@ -5,4 +5,7 @@
 #define NR_IRQS 128
 #define MIPS_CPU_IRQ_BASE 0
 
+void __dispatch_internal_32(int cpu);
+void __dispatch_internal_64(int cpu);
+
 #endif
Signature · 1 line
2.34.1
#1 lore raw

Hi,

Quoted 3 lines · Florian Fainelli

We have a number of missing prototypes warnings for the BCM63XX machine, fix those by providing adequate function prototypes.

None of these prototypes should be needed, most functions are never called outside of their units and are just missing a static annotation, and one already has a prototype in a different header.

Quoted 14 lines
---
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h    | 8 ++++++++
 arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h  | 1 +
 arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h | 2 ++
 arch/mips/include/asm/mach-bcm63xx/irq.h            | 3 +++
 4 files changed, 14 insertions(+)
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +0 -0
index 1cad18e6681d..b9ab5ee1c7b2 100644

arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h void bcm63xx_machine_halt(void); · line 1068

Quoted 4 lines
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +1 -0
@@ -1065,4 +1065,12 @@ void bcm63xx_machine_halt(void);
 
 void bcm63xx_machine_reboot(void);
 
+int bcm63xx_register_devices(void);

defined and used only in arch/mips/bcm63xx/setup.c

arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h void bcm63xx_machine_halt(void); · line 1070

Quoted 2 lines
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +2 -0
+
+int bcm63xx_rng_register(void);

defined and used only in arch/mips/bcm63xx/dev-rng.c

arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h void bcm63xx_machine_halt(void); · line 1072

Quoted 2 lines
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +2 -0
+
+int bcm63xx_uart_register(unsigned int id);

This one already has a prototype in bcm63xx_dev_uart.h, arch/mips/bcm63xx/dev-uart.c just needs to include that header file.

arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h void bcm63xx_machine_halt(void); · line 1074

Quoted 2 lines
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +2 -0
+
+int bcm63xx_wdt_register(void);

defined and used only in arch/mips/bcm63xx/dev-wdt.c

arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us); · line 11

Quoted 11 lines
arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h +1 -0
+
 #endif /* !BCM63XX_CPU_H_ */
arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h +1 -0
index bcbece793fd8..f920c7274f5e 100644
@@ -8,5 +8,6 @@ int bcm63xx_timer_set(int id, int monotonic, unsigned int countdown_us);
 int bcm63xx_timer_enable(int id);
 int bcm63xx_timer_disable(int id);
 unsigned int bcm63xx_timer_countdown(unsigned int countdown_us);
+int bcm63xx_timer_init(void);

defined and used only in arch/mips/bcm63xx/timer.c

arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h struct board_info { · line 54

Quoted 11 lines
arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h +0 -0
 #endif /* !BCM63XX_TIMER_H_ */
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +1 -0
index 830f53f28e3f..7b905c8a424d 100644
@@ -51,4 +51,6 @@ struct board_info {
        unsigned long ephy_reset_gpio_flags;
 };
 
+int bcm63xx_get_fallback_sprom(struct ssb_bus *bus, struct ssb_sprom *out);

defined and used only in arch/mips/bcm63xx/boards/board_bcm963xx.c

arch/mips/include/asm/mach-bcm63xx/irq.h line 9

Quoted 12 lines
arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h +1 -0
+
 #endif /* ! BOARD_BCM963XX_H_ */
arch/mips/include/asm/mach-bcm63xx/irq.h +2 -0
index b016f0615d5f..cbb92a609835 100644
@@ -5,4 +5,7 @@
 #define NR_IRQS 128
 #define MIPS_CPU_IRQ_BASE 0
 
+void __dispatch_internal_32(int cpu);
+void __dispatch_internal_64(int cpu);

dispatch __dispatch_internal_32()/__dispatch_internal_64() are defined and used only in arch/mips/bcm63xx/irq.c

Best Regards,
Jonas