Commit e7fcfe67 authored by Yang Li's avatar Yang Li Committed by Rafael J. Wysocki

thermal: intel: Fix unsigned comparison with less than zero

The return value from the call to intel_tcc_get_tjmax() is int, which can
be a negative error code. However, the return value is being assigned to
an u32 variable 'tj_max', so making 'tj_max' an int.

Eliminate the following warning:
./drivers/thermal/intel/intel_soc_dts_iosf.c:394:5-11: WARNING: Unsigned expression compared with zero: tj_max < 0

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3637Reported-by: default avatarAbaci Robot <abaci@linux.alibaba.com>
Signed-off-by: default avatarYang Li <yang.lee@linux.alibaba.com>
Acked-by: default avatarZhang Rui <rui.zhang@intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 58374a39
...@@ -380,7 +380,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init( ...@@ -380,7 +380,7 @@ struct intel_soc_dts_sensors *intel_soc_dts_iosf_init(
{ {
struct intel_soc_dts_sensors *sensors; struct intel_soc_dts_sensors *sensors;
bool notification; bool notification;
u32 tj_max; int tj_max;
int ret; int ret;
int i; int i;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment