From 68930ebd8989519f73ebf45f20d101ae6c69a6cd Mon Sep 17 00:00:00 2001 From: Eunseok Choi Date: Fri, 24 Nov 2017 10:58:21 +0900 Subject: [PATCH] [COMMON] thermal: fix prevent error CID: 202888 202205 202201 201542 200628 200625 Resolved migration conflicts from kernel 4.9 to 4.14. - rename cpufreq_device -> cpufreq_cdev - rename gpufreq_device -> gpufreq_cdev Change-Id: I926e40f0539d4b795be2e34d55108d3b3c0dfdc9 Signed-off-by: Eunseok Choi --- drivers/thermal/cpu_cooling.c | 2 +- drivers/thermal/gpu_cooling.c | 4 ++-- drivers/thermal/isp_cooling.c | 2 +- drivers/thermal/power_allocator.c | 6 +++--- drivers/thermal/samsung/exynos_tmu.c | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/cpu_cooling.c b/drivers/thermal/cpu_cooling.c index aa49fd3f8763..d52e5612363f 100644 --- a/drivers/thermal/cpu_cooling.c +++ b/drivers/thermal/cpu_cooling.c @@ -383,7 +383,7 @@ static int lookup_static_power(struct cpufreq_cooling_device *cpufreq_cdev, temperature = temperature / 1000; for (volt_index = 0; volt_index <= cpufreq_cdev->var_volt_size; volt_index++) { - if (voltage < cpufreq_cdev->var_table[volt_index * (cpufreq_cdev->var_temp_size + 1)]) { + if (voltage < cpufreq_cdev->var_table[volt_index * ((int)cpufreq_cdev->var_temp_size + 1)]) { volt_index = volt_index - 1; break; } diff --git a/drivers/thermal/gpu_cooling.c b/drivers/thermal/gpu_cooling.c index 3f88c4240e53..514a2a2fcfd2 100644 --- a/drivers/thermal/gpu_cooling.c +++ b/drivers/thermal/gpu_cooling.c @@ -427,7 +427,7 @@ static int lookup_static_power(struct gpufreq_cooling_device *gpufreq_cdev, temperature = temperature / 1000; for (volt_index = 0; volt_index <= gpufreq_cdev->var_volt_size; volt_index++) { - if (voltage < gpufreq_cdev->var_table[volt_index * (gpufreq_cdev->var_temp_size + 1)]) { + if (voltage < gpufreq_cdev->var_table[volt_index * ((int)gpufreq_cdev->var_temp_size + 1)]) { volt_index = volt_index - 1; break; } @@ -1063,7 +1063,7 @@ static int gpu_cooling_table_init(void) gpu_freq_table[count].flags = 0; gpu_freq_table[count].driver_data = count; - gpu_freq_table[count].frequency = freq * 1000; + gpu_freq_table[count].frequency = (unsigned int)freq * 1000; pr_info("[GPU cooling] index : %d, frequency : %d\n", gpu_freq_table[count].driver_data, gpu_freq_table[count].frequency); diff --git a/drivers/thermal/isp_cooling.c b/drivers/thermal/isp_cooling.c index 8f2100d0d574..7978fcd72b11 100644 --- a/drivers/thermal/isp_cooling.c +++ b/drivers/thermal/isp_cooling.c @@ -262,7 +262,7 @@ static int isp_apply_cooling(struct isp_cooling_device *isp_device, if (isp_device->isp_state == cooling_state) return 0; - isp_device->isp_state = cooling_state; + isp_device->isp_state = (unsigned int)cooling_state; blocking_notifier_call_chain(&isp_notifier, ISP_THROTTLING, &cooling_state); diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c index e8728b52d942..e987f8b2938d 100644 --- a/drivers/thermal/power_allocator.c +++ b/drivers/thermal/power_allocator.c @@ -234,8 +234,8 @@ static u32 pid_controller(struct thermal_zone_device *tz, s64 i_next = i + mul_frac(tz->tzp->k_i, err); s64 i_windup = int_to_frac(-1 * (s64)tz->tzp->sustainable_power); - if (i_next > int_to_frac(tz->tzp->integral_max)) { - i = int_to_frac(tz->tzp->integral_max); + if (i_next > int_to_frac((s64)tz->tzp->integral_max)) { + i = int_to_frac((s64)tz->tzp->integral_max); params->err_integral = div_frac(i, tz->tzp->k_i); } else if (i_next <= i_windup) { i = i_windup; @@ -532,7 +532,7 @@ static void get_governor_trips(struct thermal_zone_device *tz, static void reset_pid_controller(struct power_allocator_params *params, struct thermal_zone_device *tz) { - s64 i = int_to_frac(tz->tzp->integral_max); + s64 i = int_to_frac((s64)tz->tzp->integral_max); params->err_integral = div_frac(i, tz->tzp->k_i); params->prev_err = 0; diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 966a120d041e..710ac56b4071 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -925,7 +925,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) struct exynos_tmu_data *data = platform_get_drvdata(pdev); struct exynos_tmu_platform_data *pdata; struct resource res; - int i; + unsigned int i; const char *temp, *tmu_name; if (!data || !pdev->dev.of_node) @@ -977,7 +977,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) else { for (i = 0; isensing_mode = i; + data->sensing_mode = (int)i; } data->balance_offset = DEFAULT_BALANCE_OFFSET; -- 2.20.1