Commit 865da01c authored by Santosh Shilimkar's avatar Santosh Shilimkar Committed by Tony Lindgren

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: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarSantosh Shilimkar <santosh.shilimkar@ti.com>
Signed-off-by: default avatarMugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent deff82e6
...@@ -23,6 +23,8 @@ ...@@ -23,6 +23,8 @@
#include "prm.h" #include "prm.h"
#include "clockdomain.h" #include "clockdomain.h"
#define MAX_CPUS 2
/* Machine specific information */ /* Machine specific information */
struct idle_statedata { struct idle_statedata {
u32 cpu_state; u32 cpu_state;
...@@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = { ...@@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = {
}, },
}; };
static struct powerdomain *mpu_pd, *cpu_pd[NR_CPUS]; static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS];
static struct clockdomain *cpu_clkdm[NR_CPUS]; static struct clockdomain *cpu_clkdm[MAX_CPUS];
static atomic_t abort_barrier; static atomic_t abort_barrier;
static bool cpu_done[NR_CPUS]; static bool cpu_done[MAX_CPUS];
static struct idle_statedata *state_ptr = &omap4_idle_data[0]; static struct idle_statedata *state_ptr = &omap4_idle_data[0];
/* Private functions */ /* Private functions */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment