diff mbox series

block: swim3: Mark swim3_init() static to fix no previous prototype error

Message ID 4798f19879b0470c07ee6a37aa79eae04db5d433.1692283840.git.christophe.leroy@csgroup.eu (mailing list archive)
State New, archived
Headers show
Series block: swim3: Mark swim3_init() static to fix no previous prototype error | expand

Commit Message

Christophe Leroy Aug. 17, 2023, 2:51 p.m. UTC
With pmac32_defconfig W=1:

  CC [M]  drivers/block/swim3.o
drivers/block/swim3.c:1280:5: warning: no previous prototype for 'swim3_init' [-Wmissing-prototypes]
 1280 | int swim3_init(void)
      |     ^~~~~~~~~~

swim3_init() is called locally via module_init(), it should be static.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Arnd Bergmann <arnd@arndb.de>
---
 drivers/block/swim3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index dc43a63b3469..c2bc85826358 100644
--- a/drivers/block/swim3.c
+++ b/drivers/block/swim3.c
@@ -1277,7 +1277,7 @@  static struct macio_driver swim3_driver =
 };
 
 
-int swim3_init(void)
+static int swim3_init(void)
 {
 	macio_register_driver(&swim3_driver);
 	return 0;