Commit 4200c35d authored by Jesper Nilsson's avatar Jesper Nilsson

CRIS v10: Cleanup kernel/fasttimer.c

- Change C99 comment style to C89.
- Remove superfluous SANITYCHECK macro, test FAST_TIMER_SANITY_CHECKS instead.
parent 72af70cf
...@@ -31,15 +31,12 @@ ...@@ -31,15 +31,12 @@
#define DEBUG_LOG_INCLUDED #define DEBUG_LOG_INCLUDED
#define FAST_TIMER_LOG #define FAST_TIMER_LOG
//#define FAST_TIMER_TEST /* #define FAST_TIMER_TEST */
#define FAST_TIMER_SANITY_CHECKS #define FAST_TIMER_SANITY_CHECKS
#ifdef FAST_TIMER_SANITY_CHECKS #ifdef FAST_TIMER_SANITY_CHECKS
#define SANITYCHECK(x) x
static int sanity_failed; static int sanity_failed;
#else
#define SANITYCHECK(x)
#endif #endif
#define D1(x) #define D1(x)
...@@ -226,23 +223,19 @@ void start_one_shot_timer(struct fast_timer *t, ...@@ -226,23 +223,19 @@ void start_one_shot_timer(struct fast_timer *t,
do_gettimeofday_fast(&t->tv_set); do_gettimeofday_fast(&t->tv_set);
tmp = fast_timer_list; tmp = fast_timer_list;
SANITYCHECK({ /* Check so this is not in the list already... */ #ifdef FAST_TIMER_SANITY_CHECKS
while (tmp != NULL) /* Check so this is not in the list already... */
{ while (tmp != NULL) {
if (tmp == t) if (tmp == t) {
{ printk(KERN_WARNING "timer name: %s data: "
printk(KERN_WARNING "0x%08lX already in list!\n", name, data);
"timer name: %s data: 0x%08lX already in list!\n", name, data); sanity_failed++;
sanity_failed++; goto done;
goto done; } else
} tmp = tmp->next;
else }
{ tmp = fast_timer_list;
tmp = tmp->next; #endif
}
}
tmp = fast_timer_list;
});
t->delay_us = delay_us; t->delay_us = delay_us;
t->function = function; t->function = function;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment