thermal: int340x: Fix slider_balance param get returning wrong value
PATCH 1/1 thermal: int340x: Fix slider_balance param get returning wrong value
The slider_def_balance_get() function returns the array value slider_values[SOC_POWER_SLIDER_BALANCE] instead of the actual module parameter slider_balanced_param. This means reading the slider_balance sysfs attribute always shows the default value (0x03) rather than the user-configured value set via module parameter or sysfs write.
Return slider_balanced_param to correctly reflect the current module parameter value.
--- .../intel/int340x_thermal/processor_thermal_soc_slider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c +1 -1
@@ -80,7 +80,7 @@ static int slider_def_balance_set(const char *arg, const struct kernel_param *kpstatic int slider_def_balance_get (char *buf,const struct kernel_param *kp) {guard (mutex)(&slider_param_lock); -return sysfs_emit (buf,"%02x\n" , slider_values[SOC_POWER_SLIDER_BALANCE ]); +return sysfs_emit (buf,"%02x\n" , slider_balanced_param); }static const struct kernel_param_ops slider_def_balance_ops = {
Signature · 1 line
2.34.1
Adding Cc: [email protected]
No code changes.
Original patch: https://lore.kernel.org/all/[email protected]/
-----Original Message-----
From: Kumar, Kaushlendra <[email protected]>
Sent: Monday, December 15, 2025 12:04 PM
To: [email protected]; [email protected]; Zhang, Rui <[email protected]>; [email protected]
Cc: [email protected]; Kumar, Kaushlendra <[email protected]>
Subject: [PATCH] thermal: int340x: Fix slider_balance param get returning wrong value
The slider_def_balance_get() function returns the array value slider_values[SOC_POWER_SLIDER_BALANCE] instead of the actual module parameter slider_balanced_param. This means reading the slider_balance sysfs attribute always shows the default value (0x03) rather than the user-configured value set via module parameter or sysfs write.
Return slider_balanced_param to correctly reflect the current module parameter value.
--- .../intel/int340x_thermal/processor_thermal_soc_slider.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider renamed from drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider.c +0 -0
+++ .c
@@ -80,7 +80,7 @@ static int slider_def_balance_set(const char *arg, const struct kernel_param *kp static int slider_def_balance_get(char *buf, const struct kernel_param *kp) {
guard(mutex)(&slider_param_lock);
- return sysfs_emit(buf, "%02x\n", slider_values[SOC_POWER_SLIDER_BALANCE]);
+ return sysfs_emit(buf, "%02x\n", slider_balanced_param);
}
static const struct kernel_param_ops slider_def_balance_ops = {
--
2.34.1
Quoted 24 lines · Kaushlendra
Adding Cc: [email protected]
No code changes.
Original patch:
https://lore.kernel.org/all/[email protected]/-----Original Message-----
From: Kumar, Kaushlendra <[email protected]>
Sent: Monday, December 15, 2025 12:04 PM
To: [email protected]; [email protected]; Zhang, Rui <[email protected]>; [email protected]
Cc: [email protected]; Kumar, Kaushlendra <[email protected]>
Subject: [PATCH] thermal: int340x: Fixslider_balanceparam get returning wrong valueThe
slider_def_balance_get()function returns the array value slider_values[SOC_POWER_SLIDER_BALANCE] instead of the actual module parameterslider_balanced_param. This means reading theslider_balancesysfs attribute always shows the default value (0x03) rather than the user-configured value set via module parameter or sysfs write.
Quoted 2 lines
Return
slider_balanced_paramto correctly reflect the current module parameter value.
That is the intentional. This shows what is the current value used for balance slider.
Setting module parameter is not enough. It needs to be applied by changing/updating profile, otherwise there is no way to know what value is getting used now.
Once you touched profile you will see the value you set.
Thanks,
Srinivas
Quoted 31 lines
Signed-off-by Kaushlendra Kumar <[email protected]>---
.../intel/int340x_thermal/processor_thermal_soc_slider.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)diff --git a/drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider. c b/drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider. c
index49ff3bae7271..96307dcb4812100644
---
a/drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider. c
+++
b/drivers/thermal/intel/int340x_thermal/processor_thermal_soc_slider +++ .c(quoted diff) +0
-0@@ -80,7 +80,7 @@ static int slider_def_balance_set(const char *arg,const struct
kernel_param*kp static intslider_def_balance_get(char *buf, const struct kernel_param *kp){ guard(mutex)(&slider_param_lock);(quoted diff) +0
-1- return sysfs_emit(buf, "%02x\n",slider_values[SOC_POWER_SLIDER_BALANCE]);
(quoted diff) +1
-0+ return sysfs_emit(buf, "%02x\n", slider_balanced_param);}
static const structkernel_param_opsslider_def_balance_ops= { --
2.34.1