linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: W_Armin@gmx.de
To: pali@kernel.org
Cc: linux@roeck-us.net, jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: [PATCH v6 2/6] hwmon: (dell-smm-hwmon) Mark functions as __init
Date: Wed, 28 Jul 2021 22:51:38 +0200	[thread overview]
Message-ID: <20210728205142.8959-3-W_Armin@gmx.de> (raw)
In-Reply-To: <20210728205142.8959-1-W_Armin@gmx.de>

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>
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 f06873413aea..c898d6bd6a18 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


  parent reply	other threads:[~2021-07-28 20:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 20:51 [PATCH v6 0/6] hwmon: (dell-smm-hwmon) Convert to new hwmon registration api W_Armin
2021-07-28 20:51 ` [PATCH v6 1/6] hwmon: (dell-smm-hwmon) Use platform device W_Armin
2021-07-28 20:51 ` W_Armin [this message]
2021-07-28 20:51 ` [PATCH v6 3/6] hwmon: (dell-smm-hwmon) Use devm_add_action_or_reset() W_Armin
2021-07-28 20:51 ` [PATCH v6 4/6] hwmon: (dell-smm-hwmon) Move variables into a driver private data structure W_Armin
2021-07-28 20:51 ` [PATCH v6 5/6] hwmon: (dell-smm-hwmon) Convert to devm_hwmon_device_register_with_info() W_Armin
2021-07-28 20:51 ` [PATCH v6 6/6] hwmon: (dell-smm-hwmon) Fix fan mutliplier detection for 3rd fan W_Armin
2021-07-28 21:07 ` [PATCH v6 0/6] hwmon: (dell-smm-hwmon) Convert to new hwmon registration api Guenter Roeck
2021-07-28 21:19   ` Armin Wolf
2021-07-28 21:28     ` Guenter Roeck
2021-07-28 21:34       ` Armin Wolf
2021-07-28 21:37         ` Guenter Roeck
2021-07-28 21:40           ` Armin Wolf
2021-07-28 21:54             ` Pali Rohár
2021-07-28 22:36               ` 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=20210728205142.8959-3-W_Armin@gmx.de \
    --to=w_armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --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).