Skip to content

Commit

Permalink
hw-mgmt: thermal: TC change log message 'info' to 'warning'
Browse files Browse the repository at this point in the history
Change TC log mesage type to "Warning" instead of "Info". This message used
for unexpected thermal value warnings

Bug: #4050264

Signed-off-by: Oleksandr Shamray <[email protected]>
  • Loading branch information
sholeksandr committed Aug 29, 2024
1 parent 72cef17 commit 78c2391
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions usr/usr/bin/hw_management_thermal_control.py
Original file line number Diff line number Diff line change
Expand Up @@ -1413,13 +1413,13 @@ def handle_input(self, thermal_table, flow_dir, amb_tmp):
value = self.read_file_int(self.file_input, self.scale)
self.handle_reading_file_err(self.file_input, reset=True)
except BaseException:
self.log.info("Wrong value reading from file: {}".format(self.file_input))
self.log.warn("Wrong value reading from file: {}".format(self.file_input))
self.handle_reading_file_err(self.file_input)
self.update_value(value)

if self.value > self.val_max:
pwm = self.pwm_max
self.log.info("{} value({}) more then max({}). Set pwm {}".format(self.name,
self.log.warn("{} value({}) more then max({}). Set pwm {}".format(self.name,
self.value,
self.val_max,
pwm))
Expand Down Expand Up @@ -1564,7 +1564,7 @@ def handle_input(self, thermal_table, flow_dir, amb_tmp):
if self.value != 0:
if self.value > self.val_max:
pwm = self.pwm_max
self.log.info("{} value({}) more then max({}). Set pwm {}".format(self.name,
self.log.warn("{} value({}) more then max({}). Set pwm {}".format(self.name,
self.value,
self.val_max,
pwm))
Expand Down Expand Up @@ -2110,7 +2110,7 @@ def handle_input(self, thermal_table, flow_dir, amb_tmp):
value = 0
rpm_file_name = "thermal/fan{}_speed_get".format(self.tacho_idx + tacho_id)
if not self.check_file(rpm_file_name):
self.log.info("Missing file {}".format(rpm_file_name))
self.log.warn("Missing file {}".format(rpm_file_name))
else:
try:
value = int(self.read_file(rpm_file_name))
Expand Down Expand Up @@ -2276,13 +2276,13 @@ def handle_input(self, thermal_table, flow_dir, amb_tmp):

if self.value > self.val_max:
self.update_value(self.val_max)
self.log.info("{} value({}) more then max({}). Set value {}".format(self.name,
self.log.warn("{} value({}) more then max({}). Set value {}".format(self.name,
self.value,
self.val_max,
self.val_max))
elif self.value < self.val_min:
self.update_value(self.val_min)
self.log.debug("{} value {} less then min({})".format(self.name, self.value, self.val_min))
self.log.warn("{} value {} less then min({})".format(self.name, self.value, self.val_min))

self.pwm = self.calculate_pwm_formula()

Expand Down

0 comments on commit 78c2391

Please sign in to comment.