PM / load_analyzer: Remove build warnings 77/159177/1
authorWook Song <wook16.song@samsung.com>
Tue, 7 Nov 2017 09:19:33 +0000 (18:19 +0900)
committerWook Song <wook16.song@samsung.com>
Tue, 7 Nov 2017 09:19:33 +0000 (18:19 +0900)
This patch removes build warnings caused by redefined macros and unused
variables.

Change-Id: I593b5b0e010b4fdf03d46dc8b5a74d41c5787b32
Signed-off-by: Wook Song <wook16.song@samsung.com>
drivers/power/load_analyzer_current.c
drivers/power/load_analyzer_sc7730.c
include/linux/clk_mon.h

index b33897a..5a275cd 100644 (file)
@@ -2,8 +2,6 @@
 
 #include <linux/jiffies.h>
 
-
-static unsigned long current_boot_completed;
 #if defined(CONFIG_SLP_BUSY_LEVEL)
 int cpu_busy_level;
 int la_get_cpu_busy_level(void)
@@ -111,6 +109,7 @@ int check_load_level(unsigned int current_cnt)
 #if defined(CONFIG_SLP_CURRENT_MONITOR)
 #define CM_SAVE_DATA_NUM       100
 
+static unsigned long current_boot_completed;
 int save_end_index;
 int save_start_index = 1;
 
index 6074a0e..e5e3cb0 100644 (file)
@@ -651,15 +651,7 @@ int gpu_load_checking(unsigned int cnt)
 int cpu_load_checking(unsigned int cnt)
 {
        int ret = NOT_BUSY_LOAD;
-       unsigned int high_cpufreq, high_usage, amount_usage = 0;
-#if 0
-       high_cpufreq = max(cpu_load_freq_history[cnt].cpufreq[0], cpu_load_freq_history[cnt].cpufreq[1]);
-       high_cpufreq = max(high_cpufreq, cpu_load_freq_history[cnt].cpufreq[2]);
-       high_cpufreq = max(high_cpufreq, cpu_load_freq_history[cnt].cpufreq[3]);
-       high_usage = max(cpu_load_freq_history[cnt].cpu_load[0], cpu_load_freq_history[cnt].cpu_load[1]);
-       high_usage = max(high_usage, cpu_load_freq_history[cnt].cpu_load[2]);
-       high_usage = max(high_usage, cpu_load_freq_history[cnt].cpu_load[3]);
-#endif
+       unsigned int amount_usage = 0;
 
        amount_usage += cpu_load_freq_history[cnt].cpu_load[0];
        amount_usage += cpu_load_freq_history[cnt].cpu_load[1];
index 2d67ec9..7121838 100644 (file)
@@ -3,8 +3,12 @@
 
 #define CLK_MON_MAX_CLK_GATE_NAME      30
 
+#ifndef CLK_GATES_NUM
 #define CLK_GATES_NUM                  5
+#endif
+#ifndef PWR_DOMAINS_NUM
 #define PWR_DOMAINS_NUM                        3
+#endif
 #define CLK_MON_BUF_SIZE               PAGE_SIZE
 
 enum {