Skip to content
This repository was archived by the owner on May 18, 2022. It is now read-only.

Commit 9db316b

Browse files
author
Paul Walmsley
committed
ARM: OMAP3/4: cpuidle: fix sparse and checkpatch warnings
Fix the following sparse warnings in the OMAP3/4 CPUIdle code: arch/arm/mach-omap2/cpuidle34xx.c:272:1: warning: symbol 'omap3_idle_dev' was not declared. Should it be static? arch/arm/mach-omap2/cpuidle34xx.c:274:23: warning: symbol 'omap3_idle_driver' was not declared. Should it be static? arch/arm/mach-omap2/cpuidle44xx.c:164:1: warning: symbol 'omap4_idle_dev' was not declared. Should it be static? arch/arm/mach-omap2/cpuidle44xx.c:166:23: warning: symbol 'omap4_idle_driver' was not declared. Should it be static? Also fix the following checkpatch warnings: WARNING: please, no space before tabs torvalds#44: FILE: arch/arm/mach-omap2/cpuidle34xx.c:105: +^I.name = ^I"omap3_idle",$ WARNING: please, no space before tabs torvalds#45: FILE: arch/arm/mach-omap2/cpuidle34xx.c:106: +^I.owner = ^ITHIS_MODULE,$ ERROR: code indent should use tabs where possible torvalds#211: FILE: arch/arm/mach-omap2/cpuidle44xx.c:74: + /* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */$ Signed-off-by: Paul Walmsley <[email protected]> Cc: Kevin Hilman <[email protected]> Acked-by: Santosh Shilimkar <[email protected]>
1 parent b8675e2 commit 9db316b

File tree

2 files changed

+25
-17
lines changed

2 files changed

+25
-17
lines changed

arch/arm/mach-omap2/cpuidle34xx.c

+9-5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ struct omap3_idle_statedata {
4040
u32 core_state;
4141
};
4242

43+
static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
44+
4345
static struct omap3_idle_statedata omap3_idle_data[] = {
4446
{
4547
.mpu_state = PWRDM_POWER_ON,
@@ -71,7 +73,7 @@ static struct omap3_idle_statedata omap3_idle_data[] = {
7173
},
7274
};
7375

74-
static struct powerdomain *mpu_pd, *core_pd, *per_pd, *cam_pd;
76+
/* Private functions */
7577

7678
static int __omap3_enter_idle(struct cpuidle_device *dev,
7779
struct cpuidle_driver *drv,
@@ -260,11 +262,11 @@ static int omap3_enter_idle_bm(struct cpuidle_device *dev,
260262
return ret;
261263
}
262264

263-
DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
265+
static DEFINE_PER_CPU(struct cpuidle_device, omap3_idle_dev);
264266

265-
struct cpuidle_driver omap3_idle_driver = {
266-
.name = "omap3_idle",
267-
.owner = THIS_MODULE,
267+
static struct cpuidle_driver omap3_idle_driver = {
268+
.name = "omap3_idle",
269+
.owner = THIS_MODULE,
268270
.states = {
269271
{
270272
.enter = omap3_enter_idle_bm,
@@ -327,6 +329,8 @@ struct cpuidle_driver omap3_idle_driver = {
327329
.safe_state_index = 0,
328330
};
329331

332+
/* Public functions */
333+
330334
/**
331335
* omap3_idle_init - Init routine for OMAP3 idle
332336
*

arch/arm/mach-omap2/cpuidle44xx.c

+16-12
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ static struct clockdomain *cpu_clkdm[NR_CPUS];
5454
static atomic_t abort_barrier;
5555
static bool cpu_done[NR_CPUS];
5656

57+
/* Private functions */
58+
5759
/**
5860
* omap4_enter_idle_coupled_[simple/coupled] - OMAP4 cpuidle entry functions
5961
* @dev: cpuidle device
@@ -161,9 +163,19 @@ static int omap4_enter_idle_coupled(struct cpuidle_device *dev,
161163
return index;
162164
}
163165

164-
DEFINE_PER_CPU(struct cpuidle_device, omap4_idle_dev);
166+
/*
167+
* For each cpu, setup the broadcast timer because local timers
168+
* stops for the states above C1.
169+
*/
170+
static void omap_setup_broadcast_timer(void *arg)
171+
{
172+
int cpu = smp_processor_id();
173+
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
174+
}
175+
176+
static DEFINE_PER_CPU(struct cpuidle_device, omap4_idle_dev);
165177

166-
struct cpuidle_driver omap4_idle_driver = {
178+
static struct cpuidle_driver omap4_idle_driver = {
167179
.name = "omap4_idle",
168180
.owner = THIS_MODULE,
169181
.en_core_tk_irqen = 1,
@@ -178,7 +190,7 @@ struct cpuidle_driver omap4_idle_driver = {
178190
.desc = "MPUSS ON"
179191
},
180192
{
181-
/* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
193+
/* C2 - CPU0 OFF + CPU1 OFF + MPU CSWR */
182194
.exit_latency = 328 + 440,
183195
.target_residency = 960,
184196
.flags = CPUIDLE_FLAG_TIME_VALID | CPUIDLE_FLAG_COUPLED,
@@ -200,15 +212,7 @@ struct cpuidle_driver omap4_idle_driver = {
200212
.safe_state_index = 0,
201213
};
202214

203-
/*
204-
* For each cpu, setup the broadcast timer because local timers
205-
* stops for the states above C1.
206-
*/
207-
static void omap_setup_broadcast_timer(void *arg)
208-
{
209-
int cpu = smp_processor_id();
210-
clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ON, &cpu);
211-
}
215+
/* Public functions */
212216

213217
/**
214218
* omap4_idle_init - Init routine for OMAP4 idle

0 commit comments

Comments
 (0)