mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 06:31:52 +00:00
CRIS v10: Cleanup kernel/fasttimer.c
- Change C99 comment style to C89. - Remove superfluous SANITYCHECK macro, test FAST_TIMER_SANITY_CHECKS instead.
This commit is contained in:
parent
72af70cfec
commit
4200c35d20
@ -31,15 +31,12 @@
|
||||
|
||||
#define DEBUG_LOG_INCLUDED
|
||||
#define FAST_TIMER_LOG
|
||||
//#define FAST_TIMER_TEST
|
||||
/* #define FAST_TIMER_TEST */
|
||||
|
||||
#define FAST_TIMER_SANITY_CHECKS
|
||||
|
||||
#ifdef FAST_TIMER_SANITY_CHECKS
|
||||
#define SANITYCHECK(x) x
|
||||
static int sanity_failed;
|
||||
#else
|
||||
#define SANITYCHECK(x)
|
||||
#endif
|
||||
|
||||
#define D1(x)
|
||||
@ -226,23 +223,19 @@ void start_one_shot_timer(struct fast_timer *t,
|
||||
do_gettimeofday_fast(&t->tv_set);
|
||||
tmp = fast_timer_list;
|
||||
|
||||
SANITYCHECK({ /* Check so this is not in the list already... */
|
||||
while (tmp != NULL)
|
||||
{
|
||||
if (tmp == t)
|
||||
{
|
||||
printk(KERN_WARNING
|
||||
"timer name: %s data: 0x%08lX already in list!\n", name, data);
|
||||
sanity_failed++;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
{
|
||||
tmp = tmp->next;
|
||||
}
|
||||
}
|
||||
tmp = fast_timer_list;
|
||||
});
|
||||
#ifdef FAST_TIMER_SANITY_CHECKS
|
||||
/* Check so this is not in the list already... */
|
||||
while (tmp != NULL) {
|
||||
if (tmp == t) {
|
||||
printk(KERN_WARNING "timer name: %s data: "
|
||||
"0x%08lX already in list!\n", name, data);
|
||||
sanity_failed++;
|
||||
goto done;
|
||||
} else
|
||||
tmp = tmp->next;
|
||||
}
|
||||
tmp = fast_timer_list;
|
||||
#endif
|
||||
|
||||
t->delay_us = delay_us;
|
||||
t->function = function;
|
||||
|
Loading…
Reference in New Issue
Block a user