Message ID | 20210528173716.10975-3-W_Armin@gmx.de (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | Convert to new hwmon registration api | expand |
On Friday 28 May 2021 19:37:12 W_Armin@gmx.de wrote: > From: Armin Wolf <W_Armin@gmx.de> > > i8k_get_dmi_data() and i8k_get_dell_signature() are > only called during module init and probe, which both > are marked as __init. > Also mark these function as __init to lower the runtime > memory footprint. > > Signed-off-by: Armin Wolf <W_Armin@gmx.de> Looks good! Reviewed-by: Pali Rohár <pali@kernel.org> Tested-by: Pali Rohár <pali@kernel.org> > --- > drivers/hwmon/dell-smm-hwmon.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c > index 2038f2a50e11..deba8819164d 100644 > --- a/drivers/hwmon/dell-smm-hwmon.c > +++ b/drivers/hwmon/dell-smm-hwmon.c > @@ -128,7 +128,7 @@ struct smm_regs { > unsigned int edi __packed; > }; > > -static inline const char *i8k_get_dmi_data(int field) > +static inline const char __init *i8k_get_dmi_data(int field) > { > const char *dmi_data = dmi_get_system_info(field); > > @@ -384,7 +384,7 @@ static int i8k_get_temp(int sensor) > return temp; > } > > -static int i8k_get_dell_signature(int req_fn) > +static int __init i8k_get_dell_signature(int req_fn) > { > struct smm_regs regs = { .eax = req_fn, }; > int rc; > -- > 2.20.1 >
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 2038f2a50e11..deba8819164d 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -128,7 +128,7 @@ struct smm_regs { unsigned int edi __packed; }; -static inline const char *i8k_get_dmi_data(int field) +static inline const char __init *i8k_get_dmi_data(int field) { const char *dmi_data = dmi_get_system_info(field); @@ -384,7 +384,7 @@ static int i8k_get_temp(int sensor) return temp; } -static int i8k_get_dell_signature(int req_fn) +static int __init i8k_get_dell_signature(int req_fn) { struct smm_regs regs = { .eax = req_fn, }; int rc;