* [PATCH] platform/x86: acer-wmi: Remove unused platform_profile_support variable
@ 2026-09-02 19:30 Justin Vargas
2026-09-18 17:35 ` Ilpo Järvinen
0 siblings, 1 reply; 2+ messages in thread
From: Justin Vargas @ 2026-09-02 19:30 UTC (permalink / raw)
To: jlee, hansg, ilpo.jarvinen
Cc: W_Armin, platform-driver-x86, linux-kernel, Justin Vargas
The platform_profile_support variable is assigned during platform
profile setup but is never read anywhere in the driver. Remove it.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Justin Vargas <justinyvar@gmail.com>
---
Found while reading through the driver. Compile tested only, as this
is a pure dead-code removal.
hp-wmi.c and asus-wmi.c appear to carry the same unused variable -
declared and assigned once, never read. All three were converted to
devm_platform_profile_register() in the same series, which may be where
the last reader went, though my clone is too shallow to confirm that.
Happy to send patches for the other two as well if that is useful; I
left them out here to keep this patch focused on the driver I use.
If the intent was for this variable to be checked somewhere rather than
removed, let me know and I will send that instead.
Disclosure: this patch was produced with the assistance of an AI model
(see the Assisted-by trailer). I have reviewed it and take
responsibility for it as signed off above.
drivers/platform/x86/acer-wmi.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 61ae622c93d..528a89c3eed 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -839,7 +839,6 @@ static const struct dmi_system_id non_acer_quirks[] __initconst = {
};
static struct device *platform_profile_device;
-static bool platform_profile_support;
/*
* The profile used before turbo mode. This variable is needed for
@@ -2199,8 +2198,6 @@ static int acer_platform_profile_setup(struct platform_device *device)
&device->dev, "acer-wmi", NULL, &acer_predator_v4_platform_profile_ops);
if (IS_ERR(platform_profile_device))
return PTR_ERR(platform_profile_device);
-
- platform_profile_support = true;
}
return 0;
}
--
2.47.3
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] platform/x86: acer-wmi: Remove unused platform_profile_support variable
2026-09-02 19:30 [PATCH] platform/x86: acer-wmi: Remove unused platform_profile_support variable Justin Vargas
@ 2026-09-18 17:35 ` Ilpo Järvinen
0 siblings, 0 replies; 2+ messages in thread
From: Ilpo Järvinen @ 2026-09-18 17:35 UTC (permalink / raw)
To: Justin Vargas, Hans de Goede, Krishna Chomal
Cc: jlee, W_Armin, platform-driver-x86, LKML
On Wed, 2 Sep 2026, Justin Vargas wrote:
> The platform_profile_support variable is assigned during platform
> profile setup but is never read anywhere in the driver. Remove it.
>
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Justin Vargas <justinyvar@gmail.com>
> ---
> Found while reading through the driver. Compile tested only, as this
> is a pure dead-code removal.
>
> hp-wmi.c and asus-wmi.c appear to carry the same unused variable -
> declared and assigned once, never read. All three were converted to
> devm_platform_profile_register() in the same series, which may be where
> the last reader went, though my clone is too shallow to confirm that.
> Happy to send patches for the other two as well if that is useful; I
> left them out here to keep this patch focused on the driver I use.
>
> If the intent was for this variable to be checked somewhere rather than
> removed, let me know and I will send that instead.
Now this is interesting, git grep finds 6 platform_profile_support words
(3 variables in two drivers) and none of them are in use. :-/
I'm not convinced there's going to be any use for any of them, probably
leftover from past. Can you make a series to remove them all, one patch
per driver.
--
i.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-18 17:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-02 19:30 [PATCH] platform/x86: acer-wmi: Remove unused platform_profile_support variable Justin Vargas
2026-09-18 17:35 ` Ilpo Järvinen
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®