linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: W_Armin@gmx.de
Cc: pali@kernel.org, jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: Re: [PATCH 1/4] hwmon: (dell-smm) Mark tables as __initconst
Date: Sat, 14 Aug 2021 10:49:29 -0700	[thread overview]
Message-ID: <20210814174929.GA2769052@roeck-us.net> (raw)
In-Reply-To: <20210814143637.11922-2-W_Armin@gmx.de>

On Sat, Aug 14, 2021 at 04:36:34PM +0200, W_Armin@gmx.de wrote:
> From: Armin Wolf <W_Armin@gmx.de>
> 
> Both the config and the DMI tables never change and
> are only used during module init for setting up
> the device data struct.
> Mark all of them as const and __initconst for a
> smaller runtime memory footprint.
> 
> 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 | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> --
> 2.20.1
> 
> diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
> index 43da32ad2dce..68af95c1d90c 100644
> --- a/drivers/hwmon/dell-smm-hwmon.c
> +++ b/drivers/hwmon/dell-smm-hwmon.c
> @@ -957,7 +957,7 @@ enum i8k_configs {
>  	DELL_XPS,
>  };
> 
> -static const struct i8k_config_data i8k_config_data[] = {
> +static const struct i8k_config_data i8k_config_data[] __initconst = {
>  	[DELL_LATITUDE_D520] = {
>  		.fan_mult = 1,
>  		.fan_max = I8K_FAN_TURBO,
> @@ -1115,7 +1115,7 @@ static const struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initconst
>   * support for affected blacklisted Dell machines stay disabled.
>   * See bug: https://bugzilla.kernel.org/show_bug.cgi?id=195751
>   */
> -static struct dmi_system_id i8k_blacklist_fan_support_dmi_table[] __initdata = {
> +static const struct dmi_system_id i8k_blacklist_fan_support_dmi_table[] __initconst = {
>  	{
>  		.ident = "Dell Inspiron 7720",
>  		.matches = {
> @@ -1156,14 +1156,14 @@ enum i8k_fan_controls {
>  	I8K_FAN_34A3_35A3,
>  };
> 
> -static const struct i8k_fan_control_data i8k_fan_control_data[] = {
> +static const struct i8k_fan_control_data i8k_fan_control_data[] __initconst = {
>  	[I8K_FAN_34A3_35A3] = {
>  		.manual_fan = 0x34a3,
>  		.auto_fan = 0x35a3,
>  	},
>  };
> 
> -static struct dmi_system_id i8k_whitelist_fan_control[] __initdata = {
> +static const struct dmi_system_id i8k_whitelist_fan_control[] __initconst = {
>  	{
>  		.ident = "Dell Latitude 5480",
>  		.matches = {

  parent reply	other threads:[~2021-08-14 17:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-14 14:36 [PATCH 0/4] hwmon: (dell-smm) Misc cleanups W_Armin
2021-08-14 14:36 ` [PATCH 1/4] hwmon: (dell-smm) Mark tables as __initconst W_Armin
2021-08-14 14:59   ` Pali Rohár
2021-08-14 17:49   ` Guenter Roeck [this message]
2021-08-14 14:36 ` [PATCH 2/4] hwmon: (dell-smm) Rework SMM function debugging W_Armin
2021-08-14 15:05   ` Pali Rohár
2021-08-14 15:29     ` Guenter Roeck
2021-08-14 15:39       ` Pali Rohár
2021-08-14 14:36 ` [PATCH 3/4] hwmon: (dell-smm) Enable automatic fan speed control for all channels W_Armin
2021-08-14 15:13   ` Pali Rohár
2021-08-14 15:32     ` Guenter Roeck
2021-08-14 14:36 ` [PATCH 4/4] hwmon: (dell-smm) Mark i8k_get_fan_nominal_speed as __init W_Armin
2021-08-14 14:59   ` Pali Rohár
2021-08-14 17:50   ` Guenter Roeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210814174929.GA2769052@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=W_Armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=pali@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).