From: "Asaf Nuri Bertizlioğlu" <asafbertizlioglu@gmail.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org,
"Asaf Nuri Bertizlioğlu" <asafbertizlioglu@gmail.com>
Subject: [PATCH] hwmon: (coretemp) Remove unused for_each_sibling() and name_attr
Date: Fri, 20 Nov 2026 19:59:26 +0300 [thread overview]
Message-ID: <20261120165926.579575-1-asafbertizlioglu@gmail.com> (raw)
The for_each_sibling() macro lost its only user in commit
e1b370b64031 ("hwmon: (coretemp) Simplify sibling management").
The name_attr member of struct platform_data has been unused since
commit d72d19c26c41 ("hwmon: (coretemp) Convert to use
devm_hwmon_device_register_with_groups"), which left the "name"
attribute to the hwmon core.
Remove both. No functional change.
Built with CONFIG_SMP=y and CONFIG_SMP=n at W=1 with no new
warnings. Apart from the struct platform_data allocation size,
which shrinks from 88 to 56 bytes, the generated code is unchanged.
The unused definitions were found with an LLM-based coding assistant,
which also drafted this changelog. Both findings were confirmed with
gcc -Wunused-macros, git grep and the git history.
Signed-off-by: Asaf Nuri Bertizlioğlu <asafbertizlioglu@gmail.com>
---
drivers/hwmon/coretemp.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 96d57fe12de6..75ba3484b1e1 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -51,13 +51,6 @@ enum coretemp_attr_index {
TOTAL_ATTRS = ATTR_TTARGET + 1 /* Maximum no of possible attrs */
};
-#ifdef CONFIG_SMP
-#define for_each_sibling(i, cpu) \
- for_each_cpu(i, topology_sibling_cpumask(cpu))
-#else
-#define for_each_sibling(i, cpu) for (i = 0; false; )
-#endif
-
/*
* Per-Core Temperature Data
* @temp_valid: Whether the CPU reported @temp as valid. @temp is not
@@ -98,7 +91,6 @@ struct platform_data {
struct cpumask cpumask;
struct temp_data *pkg_data;
struct temp_data **core_data;
- struct device_attribute name_attr;
};
struct tjmax_pci {
--
2.56.0
reply other threads:[~2026-11-20 16:59 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261120165926.579575-1-asafbertizlioglu@gmail.com \
--to=asafbertizlioglu@gmail.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
/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
all inboxes | Powered by JetHome®