From: Soomin Kim Date: Fri, 23 Sep 2016 06:54:16 +0000 (+0900) Subject: [COMMON] thermal: gpu: Cast parameter type(KASAN bug) X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8db2fd5358bd616dea98ad14abf07476d0c883e6;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] thermal: gpu: Cast parameter type(KASAN bug) 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 --- diff --git a/drivers/thermal/gpu_cooling.c b/drivers/thermal/gpu_cooling.c index dd802f4af840..2ea517876336 100644 --- a/drivers/thermal/gpu_cooling.c +++ b/drivers/thermal/gpu_cooling.c @@ -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; }