Skip to content

Commit

Permalink
ARM: OMAP: Kill warning in CPUIDLE code with !CONFIG_SMP
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Santosh Shilimkar authored and Tony Lindgren committed Feb 21, 2014
1 parent deff82e commit 865da01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/arm/mach-omap2/cpuidle44xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
#include "prm.h"
#include "clockdomain.h"

#define MAX_CPUS 2

/* Machine specific information */
struct idle_statedata {
u32 cpu_state;
Expand All @@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = {
},
};

static struct powerdomain *mpu_pd, *cpu_pd[NR_CPUS];
static struct clockdomain *cpu_clkdm[NR_CPUS];
static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS];
static struct clockdomain *cpu_clkdm[MAX_CPUS];

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];

/* Private functions */
Expand Down

0 comments on commit 865da01

Please sign in to comment.