[COMMON] thermal: gpu: Cast parameter type(KASAN bug)
authorSoomin Kim <sm8326.kim@samsung.com>
Fri, 23 Sep 2016 06:54:16 +0000 (15:54 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:27 +0000 (17:13 +0900)
The notifier in gpu_notifier.c casts parameter
to 'unsinged long' type. So, there is a type
mispatch.

Change-Id: I02f501c4fb386cb5858960857dfbd78ecdcbccd0
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
drivers/thermal/gpu_cooling.c

index dd802f4af8405596c4938edd5a89d70e0c5bb7b1..2ea5178763369cb9b628f56de9d5547dc4a98a6e 100644 (file)
@@ -594,12 +594,13 @@ static int gpufreq_set_cur_state(struct thermal_cooling_device *cdev,
        return gpufreq_apply_cooling(gpufreq_cdev, state);
 }
 
-static enum tmu_noti_state_t gpu_tstate = GPU_COLD;
+static enum gpu_noti_state_t gpu_tstate = GPU_COLD;
 
 static int gpufreq_set_cur_temp(struct thermal_cooling_device *cdev,
                                bool suspended, int temp)
 {
-       enum tmu_noti_state_t tstate;
+       enum gpu_noti_state_t tstate;
+       unsigned long value;
 
        if (suspended || temp < EXYNOS_COLD_TEMP)
                tstate = GPU_COLD;
@@ -610,8 +611,9 @@ static int gpufreq_set_cur_temp(struct thermal_cooling_device *cdev,
                return 0;
 
        gpu_tstate = tstate;
+       value = tstate;
 
-       blocking_notifier_call_chain(&gpu_notifier, tstate, &tstate);
+       blocking_notifier_call_chain(&gpu_notifier, tstate, &value);
 
        return 0;
 }