[COMMON] thermal: samsung: Print mask value
authorSoomin Kim <sm8326.kim@samsung.com>
Wed, 13 Jul 2016 01:05:35 +0000 (10:05 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:09:29 +0000 (17:09 +0900)
When cooling device register is failed, print
mask_val for debugging.

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

index 214ab07aae3543ef457d74bfc4067359fa99a21b..72bfe84bffc5f208882e77468bf1debdce6b45c6 100644 (file)
@@ -1195,14 +1195,15 @@ static int exynos_cpufreq_cooling_register(struct exynos_tmu_data *data)
 
        cool_np = cooling_spec.np;
 
-       for_each_possible_cpu(cpu) {
-               if (cpu_topology[cpu].cluster_id == data->id) {
+       for_each_possible_cpu(cpu)
+               if (cpu_topology[cpu].cluster_id == data->id)
                        cpumask_copy(&mask_val, topology_core_cpumask(cpu));
-               }
-       }
 
        data->cool_dev = of_cpufreq_cooling_register(cool_np, &mask_val);
 
+       if (IS_ERR(data->cool_dev))
+               pr_err("cooling device register fail (mask = %x) \n", *(unsigned int*)cpumask_bits(&mask_val));
+
        return ret;
 }