2022-09-22 11:35:15

by Xiu Jianfeng

[permalink] [raw]
Subject: [PATCH] ipmi: Add __init/__exit annotations to module init/exit funcs

Add missing __init/__exit annotations to module init/exit funcs.

Signed-off-by: Xiu Jianfeng <[email protected]>
---
drivers/char/ipmi/ipmi_ssif.c | 4 ++--
drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 4 ++--
drivers/char/ipmi/kcs_bmc_serio.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
index 13da021e7c6b..e1072809fe31 100644
--- a/drivers/char/ipmi/ipmi_ssif.c
+++ b/drivers/char/ipmi/ipmi_ssif.c
@@ -2098,7 +2098,7 @@ static struct platform_driver ipmi_driver = {
.id_table = ssif_plat_ids
};

-static int init_ipmi_ssif(void)
+static int __init init_ipmi_ssif(void)
{
int i;
int rv;
@@ -2140,7 +2140,7 @@ static int init_ipmi_ssif(void)
}
module_init(init_ipmi_ssif);

-static void cleanup_ipmi_ssif(void)
+static void __exit cleanup_ipmi_ssif(void)
{
if (!initialized)
return;
diff --git a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
index 486834a962c3..cf670e891966 100644
--- a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
+++ b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
@@ -548,7 +548,7 @@ static struct kcs_bmc_driver kcs_bmc_ipmi_driver = {
.ops = &kcs_bmc_ipmi_driver_ops,
};

-static int kcs_bmc_ipmi_init(void)
+static int __init kcs_bmc_ipmi_init(void)
{
kcs_bmc_register_driver(&kcs_bmc_ipmi_driver);

@@ -556,7 +556,7 @@ static int kcs_bmc_ipmi_init(void)
}
module_init(kcs_bmc_ipmi_init);

-static void kcs_bmc_ipmi_exit(void)
+static void __exit kcs_bmc_ipmi_exit(void)
{
kcs_bmc_unregister_driver(&kcs_bmc_ipmi_driver);
}
diff --git a/drivers/char/ipmi/kcs_bmc_serio.c b/drivers/char/ipmi/kcs_bmc_serio.c
index 7e2067628a6c..1793358be782 100644
--- a/drivers/char/ipmi/kcs_bmc_serio.c
+++ b/drivers/char/ipmi/kcs_bmc_serio.c
@@ -140,7 +140,7 @@ static struct kcs_bmc_driver kcs_bmc_serio_driver = {
.ops = &kcs_bmc_serio_driver_ops,
};

-static int kcs_bmc_serio_init(void)
+static int __init kcs_bmc_serio_init(void)
{
kcs_bmc_register_driver(&kcs_bmc_serio_driver);

@@ -148,7 +148,7 @@ static int kcs_bmc_serio_init(void)
}
module_init(kcs_bmc_serio_init);

-static void kcs_bmc_serio_exit(void)
+static void __exit kcs_bmc_serio_exit(void)
{
kcs_bmc_unregister_driver(&kcs_bmc_serio_driver);
}
--
2.17.1


2022-09-22 16:33:39

by Corey Minyard

[permalink] [raw]
Subject: Re: [PATCH] ipmi: Add __init/__exit annotations to module init/exit funcs

On Thu, Sep 22, 2022 at 07:19:24PM +0800, Xiu Jianfeng wrote:
> Add missing __init/__exit annotations to module init/exit funcs.

Applied, thanks.

-corey

>
> Signed-off-by: Xiu Jianfeng <[email protected]>
> ---
> drivers/char/ipmi/ipmi_ssif.c | 4 ++--
> drivers/char/ipmi/kcs_bmc_cdev_ipmi.c | 4 ++--
> drivers/char/ipmi/kcs_bmc_serio.c | 4 ++--
> 3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/char/ipmi/ipmi_ssif.c b/drivers/char/ipmi/ipmi_ssif.c
> index 13da021e7c6b..e1072809fe31 100644
> --- a/drivers/char/ipmi/ipmi_ssif.c
> +++ b/drivers/char/ipmi/ipmi_ssif.c
> @@ -2098,7 +2098,7 @@ static struct platform_driver ipmi_driver = {
> .id_table = ssif_plat_ids
> };
>
> -static int init_ipmi_ssif(void)
> +static int __init init_ipmi_ssif(void)
> {
> int i;
> int rv;
> @@ -2140,7 +2140,7 @@ static int init_ipmi_ssif(void)
> }
> module_init(init_ipmi_ssif);
>
> -static void cleanup_ipmi_ssif(void)
> +static void __exit cleanup_ipmi_ssif(void)
> {
> if (!initialized)
> return;
> diff --git a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> index 486834a962c3..cf670e891966 100644
> --- a/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> +++ b/drivers/char/ipmi/kcs_bmc_cdev_ipmi.c
> @@ -548,7 +548,7 @@ static struct kcs_bmc_driver kcs_bmc_ipmi_driver = {
> .ops = &kcs_bmc_ipmi_driver_ops,
> };
>
> -static int kcs_bmc_ipmi_init(void)
> +static int __init kcs_bmc_ipmi_init(void)
> {
> kcs_bmc_register_driver(&kcs_bmc_ipmi_driver);
>
> @@ -556,7 +556,7 @@ static int kcs_bmc_ipmi_init(void)
> }
> module_init(kcs_bmc_ipmi_init);
>
> -static void kcs_bmc_ipmi_exit(void)
> +static void __exit kcs_bmc_ipmi_exit(void)
> {
> kcs_bmc_unregister_driver(&kcs_bmc_ipmi_driver);
> }
> diff --git a/drivers/char/ipmi/kcs_bmc_serio.c b/drivers/char/ipmi/kcs_bmc_serio.c
> index 7e2067628a6c..1793358be782 100644
> --- a/drivers/char/ipmi/kcs_bmc_serio.c
> +++ b/drivers/char/ipmi/kcs_bmc_serio.c
> @@ -140,7 +140,7 @@ static struct kcs_bmc_driver kcs_bmc_serio_driver = {
> .ops = &kcs_bmc_serio_driver_ops,
> };
>
> -static int kcs_bmc_serio_init(void)
> +static int __init kcs_bmc_serio_init(void)
> {
> kcs_bmc_register_driver(&kcs_bmc_serio_driver);
>
> @@ -148,7 +148,7 @@ static int kcs_bmc_serio_init(void)
> }
> module_init(kcs_bmc_serio_init);
>
> -static void kcs_bmc_serio_exit(void)
> +static void __exit kcs_bmc_serio_exit(void)
> {
> kcs_bmc_unregister_driver(&kcs_bmc_serio_driver);
> }
> --
> 2.17.1
>