mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] MIPS: BCM63XX: Fix missing prototypes
@ 2024-01-23  4:08 Florian Fainelli
  2024-01-23 14:41 ` Jonas Gorski
  0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2024-01-23  4:08 UTC (permalink / raw)
  To: linux-mips; +Cc: Florian Fainelli, Thomas Bogendoerfer, open list

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

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 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(+)

diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
index 1cad18e6681d..b9ab5ee1c7b2 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
@@ -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_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
index bcbece793fd8..f920c7274f5e 100644
--- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
+++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
@@ -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_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
index 830f53f28e3f..7b905c8a424d 100644
--- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
+++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
@@ -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_ */
diff --git a/arch/mips/include/asm/mach-bcm63xx/irq.h b/arch/mips/include/asm/mach-bcm63xx/irq.h
index b016f0615d5f..cbb92a609835 100644
--- a/arch/mips/include/asm/mach-bcm63xx/irq.h
+++ b/arch/mips/include/asm/mach-bcm63xx/irq.h
@@ -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
-- 
2.34.1


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] MIPS: BCM63XX: Fix missing prototypes
  2024-01-23  4:08 [PATCH] MIPS: BCM63XX: Fix missing prototypes Florian Fainelli
@ 2024-01-23 14:41 ` Jonas Gorski
  0 siblings, 0 replies; 2+ messages in thread
From: Jonas Gorski @ 2024-01-23 14:41 UTC (permalink / raw)
  To: Florian Fainelli; +Cc: linux-mips, Thomas Bogendoerfer, open list

Hi,

On Tue, 23 Jan 2024 at 05:08, Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> 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.

>
> Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
> ---
>  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(+)
>
> diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
> index 1cad18e6681d..b9ab5ee1c7b2 100644
> --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
> +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_cpu.h
> @@ -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

> +
> +int bcm63xx_rng_register(void);

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

> +
> +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.

> +
> +int bcm63xx_wdt_register(void);

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

> +
>  #endif /* !BCM63XX_CPU_H_ */
> diff --git a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
> index bcbece793fd8..f920c7274f5e 100644
> --- a/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
> +++ b/arch/mips/include/asm/mach-bcm63xx/bcm63xx_timer.h
> @@ -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

>
>  #endif /* !BCM63XX_TIMER_H_ */
> diff --git a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
> index 830f53f28e3f..7b905c8a424d 100644
> --- a/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
> +++ b/arch/mips/include/asm/mach-bcm63xx/board_bcm963xx.h
> @@ -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

> +
>  #endif /* ! BOARD_BCM963XX_H_ */
> diff --git a/arch/mips/include/asm/mach-bcm63xx/irq.h b/arch/mips/include/asm/mach-bcm63xx/irq.h
> index b016f0615d5f..cbb92a609835 100644
> --- a/arch/mips/include/asm/mach-bcm63xx/irq.h
> +++ b/arch/mips/include/asm/mach-bcm63xx/irq.h
> @@ -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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-01-23 14:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-23  4:08 [PATCH] MIPS: BCM63XX: Fix missing prototypes Florian Fainelli
2024-01-23 14:41 ` Jonas Gorski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®