diff mbox series

[05/17] swim3: mark swim3_init() static

Message ID 20230810141947.1236730-6-arnd@kernel.org (mailing list archive)
State New, archived
Headers show
Series -Wmissing-prototype warning fixes | expand

Commit Message

Arnd Bergmann Aug. 10, 2023, 2:19 p.m. UTC
From: Arnd Bergmann <arnd@arndb.de>

This is the module init function, which by definition is used only
locally, so mark it static to avoid a warning:

drivers/block/swim3.c:1280:5: error: no previous prototype for 'swim3_init' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/block/swim3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jinpu Wang Aug. 10, 2023, 2:26 p.m. UTC | #1
On Thu, Aug 10, 2023 at 4:21 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> This is the module init function, which by definition is used only
> locally, so mark it static to avoid a warning:
>
> drivers/block/swim3.c:1280:5: error: no previous prototype for 'swim3_init' [-Werror=missing-prototypes]
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
lgtm
Reviewed-by: Jack Wang <jinpu.wang@ionos.com>
> ---
>  drivers/block/swim3.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
> index dc43a63b34694..c2bc85826358e 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;
> --
> 2.39.2
>
Jens Axboe Aug. 10, 2023, 2:33 p.m. UTC | #2
On 8/10/23 8:19 AM, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> This is the module init function, which by definition is used only
> locally, so mark it static to avoid a warning:
> 
> drivers/block/swim3.c:1280:5: error: no previous prototype for 'swim3_init' [-Werror=missing-prototypes]

Applied, thanks.
diff mbox series

Patch

diff --git a/drivers/block/swim3.c b/drivers/block/swim3.c
index dc43a63b34694..c2bc85826358e 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;