diff mbox series

[4/4] hwmon: (dell-smm) Mark i8k_get_fan_nominal_speed as __init

Message ID 20210814143637.11922-5-W_Armin@gmx.de (mailing list archive)
State Accepted
Headers show
Series hwmon: (dell-smm) Misc cleanups | expand

Commit Message

Armin Wolf Aug. 14, 2021, 2:36 p.m. UTC
From: Armin Wolf <W_Armin@gmx.de>

Mark function i8k_get_fan_nominal_speed() as __init since
it is only used in code also marked as __init.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/hwmon/dell-smm-hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1

Comments

Pali Rohár Aug. 14, 2021, 2:59 p.m. UTC | #1
On Saturday 14 August 2021 16:36:37 W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
> 
> Mark function i8k_get_fan_nominal_speed() as __init since
> it is only used in code also marked as __init.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

Looks good,

Reviewed-by: Pali Rohár <pali@kernel.org>

> ---
>  drivers/hwmon/dell-smm-hwmon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 0e229e3dae33..8bbeeda13faf 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -303,7 +303,7 @@ static int i8k_get_fan_type(struct dell_smm_data *data, int fan)
>  /*
>   * Read the fan nominal rpm for specific fan speed.
>   */
> -static int i8k_get_fan_nominal_speed(const struct dell_smm_data *data, int fan, int speed)
> +static int __init i8k_get_fan_nominal_speed(const struct dell_smm_data *data, int fan, int speed)
>  {
>  	struct smm_regs regs = { .eax = I8K_SMM_GET_NOM_SPEED, };
> 
> --
> 2.20.1
>
Guenter Roeck Aug. 14, 2021, 5:50 p.m. UTC | #2
On Sat, Aug 14, 2021 at 04:36:37PM +0200, W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
> 
> Mark function i8k_get_fan_nominal_speed() as __init since
> it is only used in code also marked as __init.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> Reviewed-by: Pali Rohár <pali@kernel.org>

Applied.

Thanks,
Guenter

> ---
>  drivers/hwmon/dell-smm-hwmon.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> --
> 2.20.1
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 0e229e3dae33..8bbeeda13faf 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -303,7 +303,7 @@ static int i8k_get_fan_type(struct dell_smm_data *data, int fan)
>  /*
>   * Read the fan nominal rpm for specific fan speed.
>   */
> -static int i8k_get_fan_nominal_speed(const struct dell_smm_data *data, int fan, int speed)
> +static int __init i8k_get_fan_nominal_speed(const struct dell_smm_data *data, int fan, int speed)
>  {
>  	struct smm_regs regs = { .eax = I8K_SMM_GET_NOM_SPEED, };
diff mbox series

Patch

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 0e229e3dae33..8bbeeda13faf 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -303,7 +303,7 @@  static int i8k_get_fan_type(struct dell_smm_data *data, int fan)
 /*
  * Read the fan nominal rpm for specific fan speed.
  */
-static int i8k_get_fan_nominal_speed(const struct dell_smm_data *data, int fan, int speed)
+static int __init i8k_get_fan_nominal_speed(const struct dell_smm_data *data, int fan, int speed)
 {
 	struct smm_regs regs = { .eax = I8K_SMM_GET_NOM_SPEED, };