summaryrefslogtreecommitdiffstats
path: root/recipes-kernel/linux/linux-ti-staging/0005-ARM-OMAP-Kill-warning-in-CPUIDLE-code-with-CONFIG_SM.patch
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-kernel/linux/linux-ti-staging/0005-ARM-OMAP-Kill-warning-in-CPUIDLE-code-with-CONFIG_SM.patch')
-rw-r--r--recipes-kernel/linux/linux-ti-staging/0005-ARM-OMAP-Kill-warning-in-CPUIDLE-code-with-CONFIG_SM.patch49
1 files changed, 49 insertions, 0 deletions
diff --git a/recipes-kernel/linux/linux-ti-staging/0005-ARM-OMAP-Kill-warning-in-CPUIDLE-code-with-CONFIG_SM.patch b/recipes-kernel/linux/linux-ti-staging/0005-ARM-OMAP-Kill-warning-in-CPUIDLE-code-with-CONFIG_SM.patch
new file mode 100644
index 00000000..ef6e0a77
--- /dev/null
+++ b/recipes-kernel/linux/linux-ti-staging/0005-ARM-OMAP-Kill-warning-in-CPUIDLE-code-with-CONFIG_SM.patch
@@ -0,0 +1,49 @@
1From a612d323c1e5a88a46323d5ee8547283917dd3b6 Mon Sep 17 00:00:00 2001
2From: Santosh Shilimkar <santosh.shilimkar@ti.com>
3Date: Wed, 12 Feb 2014 16:42:39 -0500
4Subject: [PATCH 5/6] ARM: OMAP: Kill warning in CPUIDLE code with !CONFIG_SMP
5
6for non SMP build, NR_CPUS is 1 and hence the code complains with below
7warnings.
8
9arch/arm/mach-omap2/cpuidle44xx.c:207:8: warning: array subscript is above array bounds [-Warray-bounds]
10arch/arm/mach-omap2/cpuidle44xx.c:212:11: warning: array subscript is above array bounds [-Warray-bounds]
11
12Kill it by making array size fixed.
13
14Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
15---
16 arch/arm/mach-omap2/cpuidle44xx.c | 8 +++++---
17 1 file changed, 5 insertions(+), 3 deletions(-)
18
19diff --git a/arch/arm/mach-omap2/cpuidle44xx.c b/arch/arm/mach-omap2/cpuidle44xx.c
20index 4c8982a..5e85f1e 100644
21--- a/arch/arm/mach-omap2/cpuidle44xx.c
22+++ b/arch/arm/mach-omap2/cpuidle44xx.c
23@@ -23,6 +23,8 @@
24 #include "prm.h"
25 #include "clockdomain.h"
26
27+#define MAX_CPUS 2
28+
29 /* Machine specific information */
30 struct idle_statedata {
31 u32 cpu_state;
32@@ -48,11 +50,11 @@ static struct idle_statedata omap4_idle_data[] = {
33 },
34 };
35
36-static struct powerdomain *mpu_pd, *cpu_pd[NR_CPUS];
37-static struct clockdomain *cpu_clkdm[NR_CPUS];
38+static struct powerdomain *mpu_pd, *cpu_pd[MAX_CPUS];
39+static struct clockdomain *cpu_clkdm[MAX_CPUS];
40
41 static atomic_t abort_barrier;
42-static bool cpu_done[NR_CPUS];
43+static bool cpu_done[MAX_CPUS];
44 static struct idle_statedata *state_ptr = &omap4_idle_data[0];
45
46 /* Private functions */
47--
481.7.9.5
49