From ccabaecbbeb04a1c2b7775e0043e2df195167a98 Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Thu, 26 Sep 2019 23:39:10 -0700 Subject: thermal: tsens: Avoid implicit enum conversions in th_state fields Clang warns: ../drivers/thermal/msm-tsens.c:998:41: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.crit_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1012:41: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.high_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1028:40: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.low_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1074:42: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.high_th_state = mode; ~ ^~~~ ../drivers/thermal/msm-tsens.c:1085:41: warning: implicit conversion from enumeration type 'enum thermal_trip_activation_mode' to different enumeration type 'enum thermal_device_mode' [-Wenum-conversion] debug_thr_state_copy.low_th_state = mode; ~ ^~~~ 5 warnings generated. Fixes: 2021d15137a3 ("thermal: tsens: Enable TSENS") Signed-off-by: Nathan Chancellor Change-Id: Ib06c8a57d7227da64684c4fa21ac2b9828034e28 --- drivers/thermal/msm-tsens.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/msm-tsens.c b/drivers/thermal/msm-tsens.c index a9358a807769..44c744272244 100644 --- a/drivers/thermal/msm-tsens.c +++ b/drivers/thermal/msm-tsens.c @@ -199,9 +199,9 @@ enum tsens_tm_trip_type { #define TSENS_TM_WRITABLE_TRIPS_MASK ((1 << TSENS_TM_TRIP_NUM) - 1) struct tsens_thrshld_state { - enum thermal_trip_activation_mode high_th_state; - enum thermal_trip_activation_mode low_th_state; - enum thermal_trip_activation_mode crit_th_state; + int high_th_state; + int low_th_state; + int crit_th_state; unsigned int high_adc_code; unsigned int low_adc_code; int high_temp; -- cgit v1.2.3