platform/x86: Remove unused platform_profile_support variables
Subsystems (3)
v2 cover platform/x86: Remove unused platform_profile_support variables
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/[email protected]
These patches were prepared with AI assistance (see the Assisted-by trailers). I compile tested them and take responsibility for them as signed off.
Justin Vargas (3):
platform/x86: acer-wmi: Remove unused platform_profile_support
variable
platform/x86: asus-wmi: Remove unused platform_profile_support member platform/x86: hp-wmi: Remove unused platform_profile_support variable
drivers/platform/x86/acer-wmi.c | 3 --- drivers/platform/x86/asus-wmi.c | 2 -- drivers/platform/x86/hp/hp-wmi.c | 2 -- 3 files changed, 7 deletions(-)
base-commit: f475845eaf3d749114a63270bf2efea459e14dd2
Signature · 1 line
2.47.3
PATCH v2 1/3 platform/x86: acer-wmi: Remove unused platform_profile_support variable
The platform_profile_support variable is assigned during platform profile setup but is never read anywhere in the driver. Remove it.
--- drivers/platform/x86/acer-wmi.c | 3 --- 1 file changed, 3 deletions(-)
drivers/platform/x86/acer-wmi.c +0 -3
@@ -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 ; }
Signature · 1 line
2.47.3
PATCH v2 2/3 platform/x86: asus-wmi: Remove unused platform_profile_support member
In reply to Justin VargasThe platform_profile_support member of struct asus_wmi is assigned during platform profile setup but is never read anywhere in the driver. Remove it.
--- drivers/platform/x86/asus-wmi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/platform/x86/asus-wmi.c +0 -2
@@ -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 ; }
Signature · 1 line
2.47.3
PATCH v2 3/3 platform/x86: hp-wmi: Remove unused platform_profile_support variable
In reply to Justin VargasThe platform_profile_support variable is assigned during platform profile setup but is never read anywhere in the driver. Remove it.
--- drivers/platform/x86/hp/hp-wmi.c | 2 -- 1 file changed, 2 deletions(-)
drivers/platform/x86/hp/hp-wmi.c +0 -2
@@ -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 ; }
Signature · 1 line
2.47.3
Ilpo Järvinen
maintainerQuoted 6 lines · Justin Vargas
acer-wmi, asus-wmi and hp-wmi each set a
platform_profile_supportflag 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.
Quoted 7 lines
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/[email protected][...]
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.