diff options
author | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-01-18 08:31:19 -0500 |
---|---|---|
committer | Jesper Nilsson <jesper.nilsson@axis.com> | 2008-02-08 05:06:30 -0500 |
commit | 4200c35d20f20948e2276553c64d0db3a5398a0c (patch) | |
tree | bd5dfb2b9933a11b48f1e90add458c640c6eb5ae /arch/cris/arch-v10 | |
parent | 72af70cfecbcd4198ebe8ff7634d31ed4b4675e0 (diff) |
CRIS v10: Cleanup kernel/fasttimer.c
- Change C99 comment style to C89.
- Remove superfluous SANITYCHECK macro, test FAST_TIMER_SANITY_CHECKS instead.
Diffstat (limited to 'arch/cris/arch-v10')
-rw-r--r-- | arch/cris/arch-v10/kernel/fasttimer.c | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/arch/cris/arch-v10/kernel/fasttimer.c b/arch/cris/arch-v10/kernel/fasttimer.c index c1a3a2100ee7..31ff35cff02c 100644 --- a/arch/cris/arch-v10/kernel/fasttimer.c +++ b/arch/cris/arch-v10/kernel/fasttimer.c | |||
@@ -31,15 +31,12 @@ | |||
31 | 31 | ||
32 | #define DEBUG_LOG_INCLUDED | 32 | #define DEBUG_LOG_INCLUDED |
33 | #define FAST_TIMER_LOG | 33 | #define FAST_TIMER_LOG |
34 | //#define FAST_TIMER_TEST | 34 | /* #define FAST_TIMER_TEST */ |
35 | 35 | ||
36 | #define FAST_TIMER_SANITY_CHECKS | 36 | #define FAST_TIMER_SANITY_CHECKS |
37 | 37 | ||
38 | #ifdef FAST_TIMER_SANITY_CHECKS | 38 | #ifdef FAST_TIMER_SANITY_CHECKS |
39 | #define SANITYCHECK(x) x | ||
40 | static int sanity_failed; | 39 | static int sanity_failed; |
41 | #else | ||
42 | #define SANITYCHECK(x) | ||
43 | #endif | 40 | #endif |
44 | 41 | ||
45 | #define D1(x) | 42 | #define D1(x) |
@@ -226,23 +223,19 @@ void start_one_shot_timer(struct fast_timer *t, | |||
226 | do_gettimeofday_fast(&t->tv_set); | 223 | do_gettimeofday_fast(&t->tv_set); |
227 | tmp = fast_timer_list; | 224 | tmp = fast_timer_list; |
228 | 225 | ||
229 | SANITYCHECK({ /* Check so this is not in the list already... */ | 226 | #ifdef FAST_TIMER_SANITY_CHECKS |
230 | while (tmp != NULL) | 227 | /* Check so this is not in the list already... */ |
231 | { | 228 | while (tmp != NULL) { |
232 | if (tmp == t) | 229 | if (tmp == t) { |
233 | { | 230 | printk(KERN_WARNING "timer name: %s data: " |
234 | printk(KERN_WARNING | 231 | "0x%08lX already in list!\n", name, data); |
235 | "timer name: %s data: 0x%08lX already in list!\n", name, data); | 232 | sanity_failed++; |
236 | sanity_failed++; | 233 | goto done; |
237 | goto done; | 234 | } else |
238 | } | 235 | tmp = tmp->next; |
239 | else | 236 | } |
240 | { | 237 | tmp = fast_timer_list; |
241 | tmp = tmp->next; | 238 | #endif |
242 | } | ||
243 | } | ||
244 | tmp = fast_timer_list; | ||
245 | }); | ||
246 | 239 | ||
247 | t->delay_us = delay_us; | 240 | t->delay_us = delay_us; |
248 | t->function = function; | 241 | t->function = function; |