ACPI/thermal : Remove zone disabled warning
Subsystems (2)
PATCH 1/1 ACPI/thermal : Remove zone disabled warning
Once thermal zone is disabled to move thermal control to user space, too many warnings printed in logs. Remove pr_warn from this path, instead warn when user mode issues request to disable thermal zone.
Signed-off-by Srinivas Pandruvada <[email protected]>
--- drivers/acpi/thermal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/acpi/thermal.c +5 -5
@@ -515,10 +515,9 @@ static void acpi_thermal_check(void *data) {struct acpi_thermal *tz = data; -if (!tz->tz_enabled) { -pr_warn ("thermal zone is disabled \n" ); +if (!tz->tz_enabled)return ; - } +thermal_zone_device_update (tz->thermal_zone); }
@@ -570,9 +569,10 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,*/ if (mode ==THERMAL_DEVICE_ENABLED ) enable =1 ; -else if (mode ==THERMAL_DEVICE_DISABLED ) +else if (mode ==THERMAL_DEVICE_DISABLED ) { enable =0 ; -else +pr_warn ("thermal zone will be disabled\n" ); + }else return -EINVAL ;if (enable != tz->tz_enabled) {
Signature · 1 line
1.8.3.1
Quoted 5 lines · Srinivas Pandruvada
Once thermal zone is disabled to move thermal control to user space, too many warnings printed in logs. Remove
pr_warnfrom this path, instead warn when user mode issues request to disable thermal zone.Signed-off-by Srinivas Pandruvada <[email protected]>
Although this is actually really under Rui's, I believe this patch makes sense to me. So, you can add my acked.
Acked-by Eduardo Valentin <[email protected]>
Quoted 35 lines
--- drivers/acpi/thermal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)drivers/acpi/thermal.c +5
-5@@ -515,10 +515,9 @@ static void acpi_thermal_check(void *data) {struct acpi_thermal *tz = data; -if (!tz->tz_enabled) { -pr_warn ("thermal zone is disabled \n" ); +if (!tz->tz_enabled)return ; - } +thermal_zone_device_update (tz->thermal_zone); }@@ -570,9 +569,10 @@ static int thermal_set_mode(struct thermal_zone_device *thermal,*/ if (mode ==THERMAL_DEVICE_ENABLED ) enable =1 ; -else if (mode ==THERMAL_DEVICE_DISABLED ) +else if (mode ==THERMAL_DEVICE_DISABLED ) { enable =0 ; -else +pr_warn ("thermal zone will be disabled\n" ); + }else return -EINVAL ;if (enable != tz->tz_enabled) {
Signature · 3 lines
You have got to be excited about what you are doing. (L. Lamport) Eduardo Valentin