aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorJesper Nilsson <jesper.nilsson@axis.com>2008-01-24 08:34:37 -0500
committerJesper Nilsson <jesper.nilsson@axis.com>2008-02-08 05:06:34 -0500
commitf64dd2191d9b64358c0f357b0f28e149ce7f3d83 (patch)
tree0f182834d7dfba38085f994d4ce919795cf0a542 /arch
parent43e6bd6aa8fa8ba5e72e1bcd9062cc3627f4a6c1 (diff)
CRIS v32: Change debug and formatting in kernel/fasttimer.c
- Don't use SANITYCHECK(x) as a macro, test FAST_TIMER_SANITY_CHECKS with ifdef. This makes it possible for automatic indent etc to work. - Correct some whitespace errors. - Don't initialize static variable.
Diffstat (limited to 'arch')
-rw-r--r--arch/cris/arch-v32/kernel/fasttimer.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/arch/cris/arch-v32/kernel/fasttimer.c b/arch/cris/arch-v32/kernel/fasttimer.c
index 30514625eee0..2de9d5849ef0 100644
--- a/arch/cris/arch-v32/kernel/fasttimer.c
+++ b/arch/cris/arch-v32/kernel/fasttimer.c
@@ -44,10 +44,7 @@
44#define FAST_TIMER_SANITY_CHECKS 44#define FAST_TIMER_SANITY_CHECKS
45 45
46#ifdef FAST_TIMER_SANITY_CHECKS 46#ifdef FAST_TIMER_SANITY_CHECKS
47#define SANITYCHECK(x) x 47static int sanity_failed;
48static int sanity_failed = 0;
49#else
50#define SANITYCHECK(x)
51#endif 48#endif
52 49
53#define D1(x) 50#define D1(x)
@@ -206,7 +203,8 @@ void start_one_shot_timer(struct fast_timer *t,
206 do_gettimeofday_fast(&t->tv_set); 203 do_gettimeofday_fast(&t->tv_set);
207 tmp = fast_timer_list; 204 tmp = fast_timer_list;
208 205
209 SANITYCHECK({ /* Check so this is not in the list already... */ 206#ifdef FAST_TIMER_SANITY_CHECKS
207 /* Check so this is not in the list already... */
210 while (tmp != NULL) { 208 while (tmp != NULL) {
211 if (tmp == t) { 209 if (tmp == t) {
212 printk(KERN_DEBUG 210 printk(KERN_DEBUG
@@ -215,10 +213,10 @@ void start_one_shot_timer(struct fast_timer *t,
215 sanity_failed++; 213 sanity_failed++;
216 goto done; 214 goto done;
217 } else 215 } else
218 tmp = tmp->next; 216 tmp = tmp->next;
219 } 217 }
220 tmp = fast_timer_list; 218 tmp = fast_timer_list;
221 }); 219#endif
222 220
223 t->delay_us = delay_us; 221 t->delay_us = delay_us;
224 t->function = function; 222 t->function = function;