ARM: sa1100: address missing prototype warnings
authorArnd Bergmann <arnd@arndb.de>
Tue, 16 May 2023 15:31:07 +0000 (17:31 +0200)
committerArnd Bergmann <arnd@arndb.de>
Fri, 26 May 2023 11:33:05 +0000 (13:33 +0200)
There are three warnings for mach-sa1100 when building with W=1:

arch/arm/common/sa1111.c:699:1: error: no previous prototype for 'sa1111_configure_smc' [-Werror=missing-prototypes]
  699 | sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac,
      | ^~~~~~~~~~~~~~~~~~~~
arch/arm/mach-sa1100/assabet.c:718:13: error: no previous prototype for 'assabet_init_irq' [-Werror=missing-prototypes]
  718 | void __init assabet_init_irq(void)
      |             ^~~~~~~~~~~~~~~~
arch/arm/mach-sa1100/pm.c:126:12: error: no previous prototype for 'sa11x0_pm_init' [-Werror=missing-prototypes]
  126 | int __init sa11x0_pm_init(void)
      |            ^~~~~~~~~~~~~~

The first two are only used locally and can be 'static', while
the last one needs to include the right header.

Link: https://lore.kernel.org/r/20230516153109.514251-12-arnd@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/common/sa1111.c
arch/arm/mach-sa1100/assabet.c
arch/arm/mach-sa1100/pm.c

index aad6ba236f0fa0cfe9dbaa8892c85df317addcc9..77c83ba81715a04bc21eb10fe3c7abd8dbb5c09a 100644 (file)
@@ -695,7 +695,7 @@ static u32 sa1111_dma_mask[] = {
 /*
  * Configure the SA1111 shared memory controller.
  */
-void
+static void
 sa1111_configure_smc(struct sa1111 *sachip, int sdram, unsigned int drac,
                     unsigned int cas_latency)
 {
index d000c678b4392f29218bcb963cf2cae92181ff24..2b833aa0212b294eecd7a8177d58c7cb50fe6c61 100644 (file)
@@ -710,7 +710,7 @@ static void __init assabet_map_io(void)
        sa1100_register_uart(2, 3);
 }
 
-void __init assabet_init_irq(void)
+static void __init assabet_init_irq(void)
 {
        u32 def_val;
 
index 9a7079f565bd394c4ae1436e8a2b14cd52acba34..0c21ef45db68742a200cd31f91081e84c8ef1cda 100644 (file)
@@ -33,6 +33,8 @@
 #include <asm/suspend.h>
 #include <asm/mach/time.h>
 
+#include "generic.h"
+
 extern int sa1100_finish_suspend(unsigned long);
 
 #define SAVE(x)                sleep_save[SLEEP_SAVE_##x] = x