public inbox for linux-hwmon@vger.kernel.org
 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 v2 2/6] hwmon: (dell-smm-hwmon) Mark functions as __init
Date: Fri, 28 May 2021 19:37:12 +0200	[thread overview]
Message-ID: <20210528173716.10975-3-W_Armin@gmx.de> (raw)
In-Reply-To: <20210528173716.10975-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>
---
 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


  parent reply	other threads:[~2021-05-28 17:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-28 17:37 [PATCH v2 0/6] Convert to new hwmon registration api W_Armin
2021-05-28 17:37 ` [PATCH v2 1/6] hwmon: (dell-smm-hwmon) Use platform device W_Armin
2021-05-28 18:53   ` Pali Rohár
2021-05-28 21:00     ` Armin Wolf
2021-05-28 17:37 ` W_Armin [this message]
2021-05-28 18:56   ` [PATCH v2 2/6] hwmon: (dell-smm-hwmon) Mark functions as __init Pali Rohár
2021-05-28 17:37 ` [PATCH v2 3/6] hwmon: (dell-smm-hwmon) Use devm_add_action_or_reset() W_Armin
2021-05-28 19:02   ` Pali Rohár
2021-05-28 17:37 ` [PATCH v2 4/6] hwmon: (dell-smm-hwmon) Move variables into a driver private data structure W_Armin
2021-05-28 17:37 ` [PATCH v2 5/6] hwmon: (dell-smm-hwmon) Convert to devm_hwmon_device_register_with_info() W_Armin
2021-05-28 17:37 ` [PATCH v2 6/6] hwmon: (dell-smm-hwmon) Update docs W_Armin
2021-05-28 17:53   ` Pali Rohár
2021-05-28 20:41     ` Armin Wolf
     [not found]     ` <90260e4f-7e3f-20af-7706-add965ae9192@gmx.de>
2021-05-28 21:10       ` Pali Rohár
2021-05-30 13:14       ` Guenter Roeck
2021-05-28 18:32 ` [PATCH v2 0/6] Convert to new hwmon registration api Pali Rohár
2021-05-28 18:40   ` Pali Rohár

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=20210528173716.10975-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