CRIS v32: Change debug and formatting in kernel/fasttimer.c
authorJesper Nilsson <jesper.nilsson@axis.com>
Thu, 24 Jan 2008 13:34:37 +0000 (14:34 +0100)
committerJesper Nilsson <jesper.nilsson@axis.com>
Fri, 8 Feb 2008 10:06:34 +0000 (11:06 +0100)
- 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.

arch/cris/arch-v32/kernel/fasttimer.c

index 30514625eee0416ae429a5c7131cd90706b2b836..2de9d5849ef023c286d67729b3c6c13a29b06338 100644 (file)
 #define FAST_TIMER_SANITY_CHECKS
 
 #ifdef FAST_TIMER_SANITY_CHECKS
-#define SANITYCHECK(x) x
-static int sanity_failed = 0;
-#else
-#define SANITYCHECK(x)
+static int sanity_failed;
 #endif
 
 #define D1(x)
@@ -206,7 +203,8 @@ 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... */
+#ifdef FAST_TIMER_SANITY_CHECKS
+       /* Check so this is not in the list already... */
        while (tmp != NULL) {
                if (tmp == t) {
                        printk(KERN_DEBUG
@@ -215,10 +213,10 @@ void start_one_shot_timer(struct fast_timer *t,
                        sanity_failed++;
                        goto done;
                } else
-        tmp = tmp->next;
-    }
-    tmp = fast_timer_list;
-  });
+                       tmp = tmp->next;
+       }
+       tmp = fast_timer_list;
+#endif
 
   t->delay_us = delay_us;
   t->function = function;