* [PATCH v2 1/3] platform/x86: acer-wmi: Remove unused platform_profile_support variable
2026-09-21 2:17 [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables Justin Vargas
@ 2026-09-21 2:17 ` Justin Vargas
2026-09-21 2:17 ` [PATCH v2 2/3] platform/x86: asus-wmi: Remove unused platform_profile_support member Justin Vargas
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Justin Vargas @ 2026-09-21 2:17 UTC (permalink / raw)
To: ilpo.jarvinen, hansg, jlee, corentin.chary, luke, denis.benato
Cc: W_Armin, krishna.chomal108, 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>
---
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 d3d741aad55..657d23c8f9a 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -859,7 +859,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
@@ -2219,8 +2218,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] 5+ messages in thread* [PATCH v2 2/3] platform/x86: asus-wmi: Remove unused platform_profile_support member
2026-09-21 2:17 [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables Justin Vargas
2026-09-21 2:17 ` [PATCH v2 1/3] platform/x86: acer-wmi: Remove unused platform_profile_support variable Justin Vargas
@ 2026-09-21 2:17 ` Justin Vargas
2026-09-21 2:20 ` [PATCH v2 3/3] platform/x86: hp-wmi: Remove unused platform_profile_support variable Justin Vargas
2026-10-05 18:24 ` [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables Ilpo Järvinen
3 siblings, 0 replies; 5+ messages in thread
From: Justin Vargas @ 2026-09-21 2:17 UTC (permalink / raw)
To: ilpo.jarvinen, hansg, jlee, corentin.chary, luke, denis.benato
Cc: W_Armin, krishna.chomal108, platform-driver-x86, linux-kernel,
Justin Vargas
The platform_profile_support member of struct asus_wmi 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>
---
drivers/platform/x86/asus-wmi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/platform/x86/asus-wmi.c b/drivers/platform/x86/asus-wmi.c
index 711f59c1aa6..3e630312139 100644
--- a/drivers/platform/x86/asus-wmi.c
+++ b/drivers/platform/x86/asus-wmi.c
@@ -320,7 +320,6 @@ struct asus_wmi {
struct fan_curve_data custom_fan_curves[3];
struct device *ppdev;
- bool platform_profile_support;
// The RSOC controls the maximum charging percentage.
bool battery_rsoc_available;
@@ -4332,7 +4331,6 @@ static int platform_profile_setup(struct asus_wmi *asus)
return PTR_ERR(asus->ppdev);
}
- asus->platform_profile_support = true;
return 0;
}
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* [PATCH v2 3/3] platform/x86: hp-wmi: Remove unused platform_profile_support variable
2026-09-21 2:17 [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables Justin Vargas
2026-09-21 2:17 ` [PATCH v2 1/3] platform/x86: acer-wmi: Remove unused platform_profile_support variable Justin Vargas
2026-09-21 2:17 ` [PATCH v2 2/3] platform/x86: asus-wmi: Remove unused platform_profile_support member Justin Vargas
@ 2026-09-21 2:20 ` Justin Vargas
2026-10-05 18:24 ` [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables Ilpo Järvinen
3 siblings, 0 replies; 5+ messages in thread
From: Justin Vargas @ 2026-09-21 2:20 UTC (permalink / raw)
To: ilpo.jarvinen, hansg, jlee, corentin.chary, luke, denis.benato
Cc: W_Armin, krishna.chomal108, 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>
---
drivers/platform/x86/hp/hp-wmi.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/platform/x86/hp/hp-wmi.c b/drivers/platform/x86/hp/hp-wmi.c
index 7ab81ce5f8d..1f165e8e1a4 100644
--- a/drivers/platform/x86/hp/hp-wmi.c
+++ b/drivers/platform/x86/hp/hp-wmi.c
@@ -556,7 +556,6 @@ static struct platform_device *hp_wmi_platform_dev;
static struct device *platform_profile_device;
static struct notifier_block platform_power_source_nb;
static enum platform_profile_option active_platform_profile;
-static bool platform_profile_support;
static bool zero_insize_support;
static struct rfkill *wifi_rfkill;
@@ -2531,7 +2530,6 @@ static int thermal_profile_setup(struct platform_device *device)
return PTR_ERR(platform_profile_device);
pr_info("Registered as platform profile handler\n");
- platform_profile_support = true;
return 0;
}
--
2.47.3
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables
2026-09-21 2:17 [PATCH v2 0/3] platform/x86: Remove unused platform_profile_support variables Justin Vargas
` (2 preceding siblings ...)
2026-09-21 2:20 ` [PATCH v2 3/3] platform/x86: hp-wmi: Remove unused platform_profile_support variable Justin Vargas
@ 2026-10-05 18:24 ` Ilpo Järvinen
3 siblings, 0 replies; 5+ messages in thread
From: Ilpo Järvinen @ 2026-10-05 18:24 UTC (permalink / raw)
To: hansg, jlee, corentin.chary, luke, denis.benato, Justin Vargas
Cc: W_Armin, krishna.chomal108, platform-driver-x86, linux-kernel
On Sun, 20 Sep 2026 22:17:17 -0400, Justin Vargas wrote:
> acer-wmi, asus-wmi and hp-wmi each set a platform_profile_support flag
> once their platform profile handler is registered, but none of them ever
> reads it. Remove all three, one patch per driver.
>
> Compile tested only, as these are pure dead-code removals.
>
> v2:
> - Extend to asus-wmi and hp-wmi, one patch per driver, as requested
> by Ilpo.
> - Rebase onto review-ilpo-next.
> v1: https://lore.kernel.org/r/20260902193039.21725-1-justinyvar@gmail.com
>
> [...]
Thank you for your contribution, it has been applied to my local
review-ilpo-next branch. Note it will show up in the public
platform-drivers-x86/review-ilpo-next branch only once I've pushed my
local branch there, which might take a while.
FYI [if applicable to your patch], as per Linus' policy change, also
fixes are mostly routed through for-next unless the fix is for a
commit introduced in the most recent cycle or is clearly a regression
fix.
The list of commits applied:
[1/3] platform/x86: acer-wmi: Remove unused platform_profile_support variable
commit: e38e2a7ea4d6978a39a087acb5246431d7c4febc
[2/3] platform/x86: asus-wmi: Remove unused platform_profile_support member
commit: ed73d513f302cfa500c65d05e0dde5c91d5de008
[3/3] platform/x86: hp-wmi: Remove unused platform_profile_support variable
commit: 69674669e5b12b2c5158d8d46ee704195d2d3461
--
i.
^ permalink raw reply [flat|nested] 5+ messages in thread