Index: kernel/generic/include/arch.h
===================================================================
--- kernel/generic/include/arch.h	(revision be6cef1be0dc2c677a0cbe6a56cde9c7cbca71c9)
+++ kernel/generic/include/arch.h	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
@@ -41,14 +41,14 @@
 #include <mm/as.h>
 
-#define DEFAULT_CONTEXT		0
+#define DEFAULT_CONTEXT  0
 
-#define CPU			THE->cpu
-#define THREAD			THE->thread
-#define TASK			THE->task
-#define AS			THE->as
-#define CONTEXT		(THE->task ? THE->task->context : DEFAULT_CONTEXT)
-#define PREEMPTION_DISABLED	THE->preemption_disabled
+#define CPU                  THE->cpu
+#define THREAD               THE->thread
+#define TASK                 THE->task
+#define AS                   THE->as
+#define CONTEXT              (THE->task ? THE->task->context : DEFAULT_CONTEXT)
+#define PREEMPTION_DISABLED  THE->preemption_disabled
 
-#define context_check(ctx1, ctx2)	((ctx1) == (ctx2))
+#define context_check(ctx1, ctx2)  ((ctx1) == (ctx2))
 
 /**
@@ -58,15 +58,15 @@
  */
 typedef struct {
-	size_t preemption_disabled;	/**< Preemption disabled counter. */
-	thread_t *thread;		/**< Current thread. */
-	task_t *task;			/**< Current task. */
-	cpu_t *cpu;			/**< Executing cpu. */
-	as_t *as;			/**< Current address space. */
+	size_t preemption_disabled;  /**< Preemption disabled counter. */
+	thread_t *thread;            /**< Current thread. */
+	task_t *task;                /**< Current task. */
+	cpu_t *cpu;                  /**< Executing cpu. */
+	as_t *as;                    /**< Current address space. */
 } the_t;
 
 #define THE  ((the_t * )(get_stack_base()))
 
-extern void the_initialize(the_t *the);
-extern void the_copy(the_t *src, the_t *dst);
+extern void the_initialize(the_t *);
+extern void the_copy(the_t *, the_t *);
 
 extern void arch_pre_mm_init(void);
@@ -80,5 +80,5 @@
 extern void reboot(void);
 extern void arch_reboot(void);
-extern void *arch_construct_function(fncptr_t *fptr, void *addr, void *caller);
+extern void *arch_construct_function(fncptr_t *, void *, void *);
 
 #endif
Index: kernel/generic/include/preemption.h
===================================================================
--- kernel/generic/include/preemption.h	(revision be6cef1be0dc2c677a0cbe6a56cde9c7cbca71c9)
+++ kernel/generic/include/preemption.h	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
Index: kernel/generic/src/preempt/preemption.c
===================================================================
--- kernel/generic/src/preempt/preemption.c	(revision be6cef1be0dc2c677a0cbe6a56cde9c7cbca71c9)
+++ kernel/generic/src/preempt/preemption.c	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -27,13 +27,13 @@
  */
 
-/** @addtogroup generic	
+/** @addtogroup generic
  * @{
  */
 
 /**
- * @file	preemption.c
- * @brief	Preemption control.
+ * @file preemption.c
+ * @brief Preemption control.
  */
- 
+
 #include <preemption.h>
 #include <arch.h>
@@ -52,5 +52,5 @@
 void preemption_enable(void)
 {
-	ASSERT(THE->preemption_disabled);
+	ASSERT(PREEMPTION_DISABLED);
 	memory_barrier();
 	THE->preemption_disabled--;
Index: kernel/generic/src/synch/mutex.c
===================================================================
--- kernel/generic/src/synch/mutex.c	(revision be6cef1be0dc2c677a0cbe6a56cde9c7cbca71c9)
+++ kernel/generic/src/synch/mutex.c	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -33,7 +33,7 @@
 /**
  * @file
- * @brief	Mutexes.
+ * @brief Mutexes.
  */
- 
+
 #include <synch/mutex.h>
 #include <synch/semaphore.h>
@@ -44,6 +44,6 @@
 /** Initialize mutex.
  *
- * @param mtx		Mutex.
- * @param type		Type of the mutex.
+ * @param mtx  Mutex.
+ * @param type Type of the mutex.
  */
 void mutex_initialize(mutex_t *mtx, mutex_type_t type)
@@ -57,12 +57,13 @@
  * Timeout mode and non-blocking mode can be requested.
  *
- * @param mtx		Mutex.
- * @param usec		Timeout in microseconds.
- * @param flags		Specify mode of operation.
+ * @param mtx   Mutex.
+ * @param usec  Timeout in microseconds.
+ * @param flags Specify mode of operation.
  *
  * For exact description of possible combinations of
  * usec and flags, see comment for waitq_sleep_timeout().
  *
- * @return		See comment for waitq_sleep_timeout().
+ * @return See comment for waitq_sleep_timeout().
+ *
  */
 int _mutex_lock_timeout(mutex_t *mtx, uint32_t usec, int flags)
@@ -70,10 +71,11 @@
 	int rc;
 
-	if (mtx->type == MUTEX_PASSIVE && THREAD) {
+	if ((mtx->type == MUTEX_PASSIVE) && (THREAD)) {
 		rc = _semaphore_down_timeout(&mtx->sem, usec, flags);
 	} else {
-		ASSERT(mtx->type == MUTEX_ACTIVE || !THREAD);
+		ASSERT((mtx->type == MUTEX_ACTIVE) || (!THREAD));
 		ASSERT(usec == SYNCH_NO_TIMEOUT);
 		ASSERT(!(flags & SYNCH_FLAGS_INTERRUPTIBLE));
+		
 		do {
 			rc = semaphore_trydown(&mtx->sem);
@@ -87,5 +89,5 @@
 /** Release mutex.
  *
- * @param mtx		Mutex.
+ * @param mtx Mutex.
  */
 void mutex_unlock(mutex_t *mtx)
Index: kernel/generic/src/synch/waitq.c
===================================================================
--- kernel/generic/src/synch/waitq.c	(revision be6cef1be0dc2c677a0cbe6a56cde9c7cbca71c9)
+++ kernel/generic/src/synch/waitq.c	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -261,5 +261,5 @@
 	int rc;
 
-	ASSERT(!PREEMPTION_DISABLED || PARAM_NON_BLOCKING(flags, usec));
+	ASSERT((!PREEMPTION_DISABLED) || (PARAM_NON_BLOCKING(flags, usec)));
 	
 	ipl = waitq_sleep_prepare(wq);
Index: kernel/generic/src/time/clock.c
===================================================================
--- kernel/generic/src/time/clock.c	(revision be6cef1be0dc2c677a0cbe6a56cde9c7cbca71c9)
+++ kernel/generic/src/time/clock.c	(revision 2e4e706a8704952b76f052d1fa9f7a72e9f6d471)
@@ -195,5 +195,5 @@
 		spinlock_unlock(&THREAD->lock);
 		
-		if (!ticks && !PREEMPTION_DISABLED) {
+		if ((!ticks) && (!PREEMPTION_DISABLED)) {
 #ifdef CONFIG_UDEBUG
 			istate_t *istate;
