diff options
author | Santosh Shilimkar <santosh.shilimkar@ti.com> | 2014-02-17 02:52:55 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2014-02-21 18:16:56 -0500 |
commit | 865da01cd98d67518befe854a71e432d894db279 (patch) | |
tree | 04306ef855db921187d505359865904d834bc808 /arch | |
parent | deff82e688a278eb4b822fd616c05fc62907bb71 (diff) |
ARM: OMAP: Kill warning in CPUIDLE code with !CONFIG_SMP
for non SMP build, NR_CPUS is 1 and hence the code complains with below
warnings.
arch/arm/mach-omap2/cpuidle44xx.c:207:8: warning: array subscript is above array bounds [-Warray-bounds]
arch/arm/mach-omap2/cpuidle44xx.c:212:11: warning: array subscript is above array bounds [-Warray-bounds]
Kill it by making array size fixed.
Acked-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/cpuidle44xx.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c index 4c158c838d40..01fc710c8181 100644 --- a/arch/arm/mach-omap2/cpuidle44xx.c +++ b/arch/arm/mach-omap2/cpuidle44xx.c | |||
@@ -23,6 +23,8 @@ | |||
23 | #include "prm.h" | 23 | #include "prm.h" |
24 | #include "clockdomain.h" | 24 | #include "clockdomain.h" |
25 | 25 | ||
26 | #define MAX_CPUS 2 | ||
27 | |||
26 | /* Machine specific information */ | 28 | /* Machine specific information */ |
27 | struct idle_statedata { | 29 | struct idle_statedata { |
28 | u32 cpu_state; | 30 | u32 cpu_state; |
@@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = { | |||
48 | }, | 50 | }, |
49 | }; | 51 | }; |
50 | 52 | ||
51 | static struct powerdomain *mpu_pd, *cpu_pd[NR_CPUS]; | 53 | static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS]; |
52 | static struct clockdomain *cpu_clkdm[NR_CPUS]; | 54 | static struct clockdomain *cpu_clkdm[MAX_CPUS]; |
53 | 55 | ||
54 | static atomic_t abort_barrier; | 56 | static atomic_t abort_barrier; |
55 | static bool cpu_done[NR_CPUS]; | 57 | static bool cpu_done[MAX_CPUS]; |
56 | static struct idle_statedata *state_ptr = &omap4_idle_data[0]; | 58 | static struct idle_statedata *state_ptr = &omap4_idle_data[0]; |
57 | 59 | ||
58 | /* Private functions */ | 60 | /* Private functions */ |