diff mbox series

[06/17] macintosh/ams: mark ams_init() static

Message ID 20230810141947.1236730-7-arnd@kernel.org (mailing list archive)
State Accepted
Commit cd50430ceb3598957803934068531a274349bcf9
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/macintosh/ams/ams-core.c:179:12: error: no previous prototype for 'ams_init' [-Werror=missing-prototypes]

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

Comments

Christophe Leroy Aug. 10, 2023, 5:21 p.m. UTC | #1
Le 10/08/2023 à 16:19, Arnd Bergmann a écrit :
> 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/macintosh/ams/ams-core.c:179:12: error: no previous prototype for 'ams_init' [-Werror=missing-prototypes]
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Christophe Leroy <christophe.leroy@csgroup.eu>

> ---
>   drivers/macintosh/ams/ams-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/macintosh/ams/ams-core.c b/drivers/macintosh/ams/ams-core.c
> index 877e8cb231283..c978b4272daa5 100644
> --- a/drivers/macintosh/ams/ams-core.c
> +++ b/drivers/macintosh/ams/ams-core.c
> @@ -176,7 +176,7 @@ int ams_sensor_attach(void)
>   	return result;
>   }
>   
> -int __init ams_init(void)
> +static int __init ams_init(void)
>   {
>   	struct device_node *np;
>
diff mbox series

Patch

diff --git a/drivers/macintosh/ams/ams-core.c b/drivers/macintosh/ams/ams-core.c
index 877e8cb231283..c978b4272daa5 100644
--- a/drivers/macintosh/ams/ams-core.c
+++ b/drivers/macintosh/ams/ams-core.c
@@ -176,7 +176,7 @@  int ams_sensor_attach(void)
 	return result;
 }
 
-int __init ams_init(void)
+static int __init ams_init(void)
 {
 	struct device_node *np;