Index: kernel/arch/amd64/include/ddi/ddi.h
===================================================================
--- kernel/arch/amd64/include/ddi/ddi.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/amd64/include/ddi/ddi.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	amd64 specific DDI declarations and macros.
+ * @brief amd64 specific DDI declarations and macros.
  */
 
Index: kernel/arch/ia32/include/ddi/ddi.h
===================================================================
--- kernel/arch/ia32/include/ddi/ddi.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ia32/include/ddi/ddi.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -32,5 +32,5 @@
 /**
  * @file
- * @brief	ia32 specific DDI declarations and macros.
+ * @brief ia32 specific DDI declarations and macros.
  */
 
Index: kernel/arch/ia32/src/asm.S
===================================================================
--- kernel/arch/ia32/src/asm.S	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ia32/src/asm.S	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -198,112 +198,114 @@
 #define INTERRUPT_ALIGN 64
 .macro handler i n
-
-.ifeq \i - 0x30     # Syscall handler
-	pushl %ds
-	pushl %es
-	pushl %fs
-	pushl %gs
-
-	#
-	# Push syscall arguments onto the stack
-	#
-	# NOTE: The idea behind the order of arguments passed in registers is to
-	#	use all scratch registers first and preserved registers next.
-	#	An optimized libc syscall wrapper can make use of this setup.
-	#
-	pushl %eax
-	pushl %ebp
-	pushl %edi
-	pushl %esi
-	pushl %ebx
-	pushl %ecx
-	pushl %edx
-	
-	# we must fill the data segment registers
-	movw $16, %ax
-	movw %ax, %ds
-	movw %ax, %es
-	
-	cld
-	sti
-	# syscall_handler(edx, ecx, ebx, esi, edi, ebp, eax)
-	call syscall_handler   
-	cli
-	addl $28, %esp         # clean-up of parameters
-	
-	popl %gs
-	popl %fs
-	popl %es
-	popl %ds
-	
-	CLEAR_NT_FLAG
-	iret
-.else	
-	/*
-	 * This macro distinguishes between two versions of ia32 exceptions.
-	 * One version has error word and the other does not have it.
-	 * The latter version fakes the error word on the stack so that the
-	 * handlers and istate_t can be the same for both types.
-	 */
-	.iflt \i - 32
-		.if (1 << \i) & ERROR_WORD_INTERRUPT_LIST
-			/* 
-			 * With error word, do nothing
+	
+	.ifeq \i - 0x30     # Syscall handler
+		pushl %ds
+		pushl %es
+		pushl %fs
+		pushl %gs
+		
+		#
+		# Push syscall arguments onto the stack
+		#
+		# NOTE: The idea behind the order of arguments passed in registers is to
+		#       use all scratch registers first and preserved registers next.
+		#       An optimized libc syscall wrapper can make use of this setup.
+		#
+		pushl %eax
+		pushl %ebp
+		pushl %edi
+		pushl %esi
+		pushl %ebx
+		pushl %ecx
+		pushl %edx
+		
+		# we must fill the data segment registers
+		movw $16, %ax
+		movw %ax, %ds
+		movw %ax, %es
+		
+		cld
+		sti
+		# syscall_handler(edx, ecx, ebx, esi, edi, ebp, eax)
+		call syscall_handler
+		cli
+		addl $28, %esp         # clean-up of parameters
+		
+		popl %gs
+		popl %fs
+		popl %es
+		popl %ds
+		
+		CLEAR_NT_FLAG
+		iret
+	.else
+		/*
+		 * This macro distinguishes between two versions of ia32 exceptions.
+		 * One version has error word and the other does not have it.
+		 * The latter version fakes the error word on the stack so that the
+		 * handlers and istate_t can be the same for both types.
+		 */
+		.iflt \i - 32
+			.if (1 << \i) & ERROR_WORD_INTERRUPT_LIST
+				/*
+				 * With error word, do nothing
+				 */
+			.else
+				/*
+				 * Version without error word
+				 */
+				subl $4, %esp
+			.endif
+		.else
+			/*
+			 * Version without error word
 			 */
-                .else
-                        /*
-                         * Version without error word,
-                         */
 			subl $4, %esp
-                .endif
-        .else
-                /*
-                 * Version without error word,
-                 */
-		subl $4, %esp
+		.endif
+		
+		pushl %ds
+		pushl %es
+		pushl %fs
+		pushl %gs
+		
+		pushl %ebp
+		pushl %edx
+		pushl %ecx
+		pushl %eax
+		
+		# we must fill the data segment registers
+		
+		movw $16, %ax
+		movw %ax, %ds
+		movw %ax, %es
+		
+		# stop stack traces here
+		xorl %ebp, %ebp
+		
+		pushl %esp          # *istate
+		pushl $(\i)         # intnum
+		call exc_dispatch   # exc_dispatch(intnum, *istate)
+		addl $8, %esp       # Clear arguments from stack
+		
+		CLEAR_NT_FLAG # Modifies %ecx
+		
+		popl %eax
+		popl %ecx
+		popl %edx
+		popl %ebp
+		
+		popl %gs
+		popl %fs
+		popl %es
+		popl %ds
+		
+		# skip error word, no matter whether real or fake
+		addl $4, %esp
+		iret
 	.endif
 	
-	pushl %ds
-	pushl %es
-	pushl %fs
-	pushl %gs
-
-	pushl %ebp
-	pushl %edx
-	pushl %ecx
-	pushl %eax
-	
-	# we must fill the data segment registers
-	movw $16, %ax
-	movw %ax, %ds
-	movw %ax, %es
-
-	# stop stack traces here
-	xorl %ebp, %ebp
-
-	pushl %esp          # *istate
-	pushl $(\i)         # intnum
-	call exc_dispatch   # excdispatch(intnum, *istate)
-	addl $8, %esp       # Clear arguments from stack
-
-	CLEAR_NT_FLAG # Modifies %ecx
-	
-	popl %eax
-	popl %ecx
-	popl %edx
-	popl %ebp
-	
-	popl %gs
-	popl %fs
-	popl %es
-	popl %ds
-
-	addl $4, %esp	# Skip error word, no matter whether real or fake.
-	iret
-.endif
-
 	.align INTERRUPT_ALIGN
 	.if (\n- \i) - 1
-	handler "(\i + 1)", \n
+		handler "(\i + 1)", \n
 	.endif
 .endm
Index: kernel/arch/ia32/src/proc/scheduler.c
===================================================================
--- kernel/arch/ia32/src/proc/scheduler.c	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ia32/src/proc/scheduler.c	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -38,5 +38,5 @@
 #include <proc/thread.h>
 #include <arch.h>
-#include <arch/context.h>	/* SP_DELTA */
+#include <arch/context.h>  /* SP_DELTA */
 #include <arch/pm.h>
 #include <arch/asm.h>
Index: kernel/arch/mips32/include/asm.h
===================================================================
--- kernel/arch/mips32/include/asm.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/mips32/include/asm.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup mips32	
+/** @addtogroup mips32
  * @{
  */
Index: kernel/arch/mips32/include/debug.h
===================================================================
--- kernel/arch/mips32/include/debug.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/mips32/include/debug.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -36,14 +36,18 @@
 #define KERN_mips23_DEBUG_H_
 
-/**	simulator enters the trace mode */
-#define ___traceon()	asm volatile ( "\t.word\t0x39\n");
-/** 	simulator leaves the trace mode */
-#define ___traceoff()	asm volatile ( "\t.word\t0x3d\n");
-/** 	register dump */
-#define ___regview()	asm volatile ( "\t.word\t0x37\n");
-/** 	halt the simulator */
-#define ___halt()	asm volatile ( "\t.word\t0x28\n");
-/**     simulator enters interactive mode */
-#define ___intmode()	asm volatile ( "\t.word\t0x29\n");
+/** Enter the simulator trace mode */
+#define ___traceon()  asm volatile ( "\t.word\t0x39\n");
+
+/** Leave the simulator trace mode */
+#define ___traceoff()  asm volatile ( "\t.word\t0x3d\n");
+
+/** Ask the simulator to dump registers */
+#define ___regview()  asm volatile ( "\t.word\t0x37\n");
+
+/** Halt the simulator */
+#define ___halt()  asm volatile ( "\t.word\t0x28\n");
+
+/** Enter the simulator interactive mode */
+#define ___intmode()  asm volatile ( "\t.word\t0x29\n");
 
 #endif
Index: kernel/arch/mips32/src/context.S
===================================================================
--- kernel/arch/mips32/src/context.S	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/mips32/src/context.S	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -28,6 +28,6 @@
 
 #include <arch/context_offset.h>
-	
-.text   
+
+.text
 
 .set noat
@@ -38,16 +38,15 @@
 .global context_restore_arch
 
-	
 context_save_arch:
 	CONTEXT_SAVE_ARCH_CORE $a0
-
+	
 	# context_save returns 1
 	j $31
-	li $2, 1	
-	
+	li $2, 1
+
 context_restore_arch:
 	CONTEXT_RESTORE_ARCH_CORE $a0
-
+	
 	# context_restore returns 0
 	j $31
-	xor $2, $2	
+	xor $2, $2
Index: kernel/arch/ppc32/include/elf.h
===================================================================
--- kernel/arch/ppc32/include/elf.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/elf.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32	
+/** @addtogroup ppc32
  * @{
  */
@@ -36,7 +36,7 @@
 #define KERN_ppc32_ELF_H_
 
-#define	ELF_MACHINE		EM_PPC
-#define ELF_DATA_ENCODING	ELFDATA2MSB
-#define ELF_CLASS		ELFCLASS32
+#define ELF_MACHINE        EM_PPC
+#define ELF_DATA_ENCODING  ELFDATA2MSB
+#define ELF_CLASS          ELFCLASS32
 
 #endif
Index: kernel/arch/ppc32/include/faddr.h
===================================================================
--- kernel/arch/ppc32/include/faddr.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/faddr.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32	
+/** @addtogroup ppc32
  * @{
  */
@@ -38,5 +38,5 @@
 #include <typedefs.h>
 
-#define FADDR(fptr)		((uintptr_t) (fptr))
+#define FADDR(fptr)  ((uintptr_t) (fptr))
 
 #endif
Index: kernel/arch/ppc32/include/fpu_context.h
===================================================================
--- kernel/arch/ppc32/include/fpu_context.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/fpu_context.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32	
+/** @addtogroup ppc32
  * @{
  */
@@ -36,7 +36,5 @@
 #define KERN_ppc32_FPU_CONTEXT_H_
 
-#ifndef KERN_ppc32_TYPES_H_
-	#include <typedefs.h>
-#endif
+#include <typedefs.h>
 
 typedef struct {
Index: kernel/arch/ppc32/include/interrupt.h
===================================================================
--- kernel/arch/ppc32/include/interrupt.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/interrupt.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -38,15 +38,15 @@
 #include <arch/exception.h>
 
-#define IVT_ITEMS 16
-#define IVT_FIRST 0
+#define IVT_ITEMS  16
+#define IVT_FIRST  0
 
-#define VECTOR_DATA_STORAGE 2
-#define VECTOR_INSTRUCTION_STORAGE 3
-#define VECTOR_EXTERNAL 4
-#define VECTOR_DECREMENTER 8
+#define VECTOR_DATA_STORAGE         2
+#define VECTOR_INSTRUCTION_STORAGE  3
+#define VECTOR_EXTERNAL             4
+#define VECTOR_DECREMENTER          8
 
 extern void start_decrementer(void);
 extern void interrupt_init(void);
-extern void extint_handler(int n, istate_t *istate);
+extern void extint_handler(int, istate_t *);
 
 #endif
Index: kernel/arch/ppc32/include/mm/as.h
===================================================================
--- kernel/arch/ppc32/include/mm/as.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/mm/as.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32mm	
+/** @addtogroup ppc32mm
  * @{
  */
@@ -36,12 +36,12 @@
 #define KERN_ppc32_AS_H_
 
-#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH	0
+#define KERNEL_ADDRESS_SPACE_SHADOWED_ARCH  0
 
-#define KERNEL_ADDRESS_SPACE_START_ARCH		((unsigned long) 0x80000000)
-#define KERNEL_ADDRESS_SPACE_END_ARCH		((unsigned long) 0xffffffff)
-#define USER_ADDRESS_SPACE_START_ARCH		((unsigned long) 0x00000000)
-#define USER_ADDRESS_SPACE_END_ARCH		((unsigned long) 0x7fffffff)
+#define KERNEL_ADDRESS_SPACE_START_ARCH  ((unsigned long) 0x80000000)
+#define KERNEL_ADDRESS_SPACE_END_ARCH    ((unsigned long) 0xffffffff)
+#define USER_ADDRESS_SPACE_START_ARCH    ((unsigned long) 0x00000000)
+#define USER_ADDRESS_SPACE_END_ARCH      ((unsigned long) 0x7fffffff)
 
-#define USTACK_ADDRESS_ARCH	(0x7fffffff - (PAGE_SIZE - 1))
+#define USTACK_ADDRESS_ARCH  (0x7fffffff - (PAGE_SIZE - 1))
 
 typedef struct {
@@ -50,7 +50,7 @@
 #include <genarch/mm/as_pt.h>
 
-#define as_constructor_arch(as, flags)		(as != as)
-#define as_destructor_arch(as)			(as != as)
-#define as_create_arch(as, flags)		(as != as)
+#define as_constructor_arch(as, flags)  (as != as)
+#define as_destructor_arch(as)          (as != as)
+#define as_create_arch(as, flags)       (as != as)
 #define as_deinstall_arch(as)
 #define as_invalidate_translation_cache(as, page, cnt)
Index: kernel/arch/ppc32/include/mm/asid.h
===================================================================
--- kernel/arch/ppc32/include/mm/asid.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/mm/asid.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32mm	
+/** @addtogroup ppc32mm
  * @{
  */
@@ -38,5 +38,5 @@
 #include <typedefs.h>
 
-#define ASID_MAX_ARCH		4096
+#define ASID_MAX_ARCH  4096
 
 typedef uint32_t asid_t;
Index: kernel/arch/ppc32/include/mm/page.h
===================================================================
--- kernel/arch/ppc32/include/mm/page.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/mm/page.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32mm	
+/** @addtogroup ppc32mm
  * @{
  */
@@ -38,15 +38,15 @@
 #include <arch/mm/frame.h>
 
-#define PAGE_WIDTH	FRAME_WIDTH
-#define PAGE_SIZE	FRAME_SIZE
+#define PAGE_WIDTH  FRAME_WIDTH
+#define PAGE_SIZE   FRAME_SIZE
 
 #ifdef KERNEL
 
 #ifndef __ASM__
-#	define KA2PA(x)	(((uintptr_t) (x)) - 0x80000000)
-#	define PA2KA(x)	(((uintptr_t) (x)) + 0x80000000)
+	#define KA2PA(x)  (((uintptr_t) (x)) - 0x80000000)
+	#define PA2KA(x)  (((uintptr_t) (x)) + 0x80000000)
 #else
-#	define KA2PA(x)	((x) - 0x80000000)
-#	define PA2KA(x)	((x) + 0x80000000)
+	#define KA2PA(x)  ((x) - 0x80000000)
+	#define PA2KA(x)  ((x) + 0x80000000)
 #endif
 
@@ -65,37 +65,43 @@
 
 /* Number of entries in each level. */
-#define PTL0_ENTRIES_ARCH	1024
-#define PTL1_ENTRIES_ARCH	0
-#define PTL2_ENTRIES_ARCH	0
-#define PTL3_ENTRIES_ARCH	1024
+#define PTL0_ENTRIES_ARCH  1024
+#define PTL1_ENTRIES_ARCH  0
+#define PTL2_ENTRIES_ARCH  0
+#define PTL3_ENTRIES_ARCH  1024
 
 /* Page table sizes for each level. */
-#define PTL0_SIZE_ARCH		ONE_FRAME
-#define PTL1_SIZE_ARCH		0
-#define PTL2_SIZE_ARCH		0
-#define PTL3_SIZE_ARCH		ONE_FRAME
+#define PTL0_SIZE_ARCH  ONE_FRAME
+#define PTL1_SIZE_ARCH  0
+#define PTL2_SIZE_ARCH  0
+#define PTL3_SIZE_ARCH  ONE_FRAME
 
 /* Macros calculating indices into page tables on each level. */
-#define PTL0_INDEX_ARCH(vaddr)	(((vaddr) >> 22) & 0x3ff)
-#define PTL1_INDEX_ARCH(vaddr)	0
-#define PTL2_INDEX_ARCH(vaddr)	0
-#define PTL3_INDEX_ARCH(vaddr)	(((vaddr) >> 12) & 0x3ff)
+#define PTL0_INDEX_ARCH(vaddr)  (((vaddr) >> 22) & 0x3ff)
+#define PTL1_INDEX_ARCH(vaddr)  0
+#define PTL2_INDEX_ARCH(vaddr)  0
+#define PTL3_INDEX_ARCH(vaddr)  (((vaddr) >> 12) & 0x3ff)
 
 /* Get PTE address accessors for each level. */
 #define GET_PTL1_ADDRESS_ARCH(ptl0, i) \
 	(((pte_t *) (ptl0))[(i)].pfn << 12)
+
 #define GET_PTL2_ADDRESS_ARCH(ptl1, i) \
 	(ptl1)
+
 #define GET_PTL3_ADDRESS_ARCH(ptl2, i) \
 	(ptl2)
-#define GET_FRAME_ADDRESS_ARCH(ptl3, i)	\
+
+#define GET_FRAME_ADDRESS_ARCH(ptl3, i) \
 	(((pte_t *) (ptl3))[(i)].pfn << 12)
 
 /* Set PTE address accessors for each level. */
 #define SET_PTL0_ADDRESS_ARCH(ptl0)
+
 #define SET_PTL1_ADDRESS_ARCH(ptl0, i, a) \
 	(((pte_t *) (ptl0))[(i)].pfn = (a) >> 12)
+
 #define SET_PTL2_ADDRESS_ARCH(ptl1, i, a)
 #define SET_PTL3_ADDRESS_ARCH(ptl2, i, a)
+
 #define SET_FRAME_ADDRESS_ARCH(ptl3, i, a) \
 	(((pte_t *) (ptl3))[(i)].pfn = (a) >> 12)
@@ -104,25 +110,30 @@
 #define GET_PTL1_FLAGS_ARCH(ptl0, i) \
 	get_pt_flags((pte_t *) (ptl0), (size_t) (i))
+
 #define GET_PTL2_FLAGS_ARCH(ptl1, i) \
 	PAGE_PRESENT
+
 #define GET_PTL3_FLAGS_ARCH(ptl2, i) \
 	PAGE_PRESENT
+
 #define GET_FRAME_FLAGS_ARCH(ptl3, i) \
 	get_pt_flags((pte_t *) (ptl3), (size_t) (i))
 
 /* Set PTE flags accessors for each level. */
-#define SET_PTL1_FLAGS_ARCH(ptl0, i, x)	\
+#define SET_PTL1_FLAGS_ARCH(ptl0, i, x) \
 	set_pt_flags((pte_t *) (ptl0), (size_t) (i), (x))
+
 #define SET_PTL2_FLAGS_ARCH(ptl1, i, x)
 #define SET_PTL3_FLAGS_ARCH(ptl2, i, x)
+
 #define SET_FRAME_FLAGS_ARCH(ptl3, i, x) \
 	set_pt_flags((pte_t *) (ptl3), (size_t) (i), (x))
 
 /* Macros for querying the last-level PTEs. */
-#define PTE_VALID_ARCH(pte)			(*((uint32_t *) (pte)) != 0)
-#define PTE_PRESENT_ARCH(pte)			((pte)->present != 0)
-#define PTE_GET_FRAME_ARCH(pte)			((pte)->pfn << 12)
-#define PTE_WRITABLE_ARCH(pte)			1
-#define PTE_EXECUTABLE_ARCH(pte)		1
+#define PTE_VALID_ARCH(pte)       (*((uint32_t *) (pte)) != 0)
+#define PTE_PRESENT_ARCH(pte)     ((pte)->present != 0)
+#define PTE_GET_FRAME_ARCH(pte)   ((pte)->pfn << 12)
+#define PTE_WRITABLE_ARCH(pte)    1
+#define PTE_EXECUTABLE_ARCH(pte)  1
 
 #ifndef __ASM__
@@ -133,34 +144,34 @@
 /** Page Table Entry. */
 typedef struct {
-	unsigned present : 1;             /**< Present bit. */
-	unsigned page_write_through : 1;  /**< Write thought caching. */
-	unsigned page_cache_disable : 1;  /**< No caching. */
-	unsigned accessed : 1;            /**< Accessed bit. */
-	unsigned global : 1;              /**< Global bit. */
-	unsigned valid : 1;               /**< Valid content even if not present. */
-	unsigned pfn : 20;                /**< Physical frame number. */
+	unsigned int present : 1;             /**< Present bit. */
+	unsigned int page_write_through : 1;  /**< Write thought caching. */
+	unsigned int page_cache_disable : 1;  /**< No caching. */
+	unsigned int accessed : 1;            /**< Accessed bit. */
+	unsigned int global : 1;              /**< Global bit. */
+	unsigned int valid : 1;               /**< Valid content even if not present. */
+	unsigned int pfn : 20;                /**< Physical frame number. */
 } pte_t;
 
 static inline unsigned int get_pt_flags(pte_t *pt, size_t i)
 {
-	pte_t *p = &pt[i];
+	pte_t *entry = &pt[i];
 	
-	return (((!p->page_cache_disable) << PAGE_CACHEABLE_SHIFT) |
-	    ((!p->present) << PAGE_PRESENT_SHIFT) |
+	return (((!entry->page_cache_disable) << PAGE_CACHEABLE_SHIFT) |
+	    ((!entry->present) << PAGE_PRESENT_SHIFT) |
 	    (1 << PAGE_USER_SHIFT) |
 	    (1 << PAGE_READ_SHIFT) |
 	    (1 << PAGE_WRITE_SHIFT) |
 	    (1 << PAGE_EXEC_SHIFT) |
-	    (p->global << PAGE_GLOBAL_SHIFT));
+	    (entry->global << PAGE_GLOBAL_SHIFT));
 }
 
 static inline void set_pt_flags(pte_t *pt, size_t i, int flags)
 {
-	pte_t *p = &pt[i];
+	pte_t *entry = &pt[i];
 	
-	p->page_cache_disable = !(flags & PAGE_CACHEABLE);
-	p->present = !(flags & PAGE_NOT_PRESENT);
-	p->global = (flags & PAGE_GLOBAL) != 0;
-	p->valid = 1;
+	entry->page_cache_disable = !(flags & PAGE_CACHEABLE);
+	entry->present = !(flags & PAGE_NOT_PRESENT);
+	entry->global = (flags & PAGE_GLOBAL) != 0;
+	entry->valid = 1;
 }
 
Index: kernel/arch/ppc32/include/mm/tlb.h
===================================================================
--- kernel/arch/ppc32/include/mm/tlb.h	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/include/mm/tlb.h	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -27,5 +27,5 @@
  */
 
-/** @addtogroup ppc32mm	
+/** @addtogroup ppc32mm
  * @{
  */
@@ -45,38 +45,41 @@
 
 typedef struct {
-	unsigned v : 1;          /**< Valid */
-	unsigned vsid : 24;      /**< Virtual Segment ID */
-	unsigned h : 1;          /**< Primary/secondary hash */
-	unsigned api : 6;        /**< Abbreviated Page Index */
-	unsigned rpn : 20;       /**< Real Page Number */
-	unsigned reserved0 : 3;
-	unsigned r : 1;          /**< Reference */
-	unsigned c : 1;          /**< Change */
-	unsigned wimg : 4;       /**< Access control */
-	unsigned reserved1 : 1;
-	unsigned pp : 2;         /**< Page protection */
+	unsigned int v : 1;          /**< Valid */
+	unsigned int vsid : 24;      /**< Virtual Segment ID */
+	unsigned int h : 1;          /**< Primary/secondary hash */
+	unsigned int api : 6;        /**< Abbreviated Page Index */
+	unsigned int rpn : 20;       /**< Real Page Number */
+	unsigned int reserved0 : 3;
+	unsigned int r : 1;          /**< Reference */
+	unsigned int c : 1;          /**< Change */
+	unsigned int wimg : 4;       /**< Access control */
+	unsigned int reserved1 : 1;
+	unsigned int pp : 2;         /**< Page protection */
 } phte_t;
 
 typedef struct {
-	unsigned v : 1;
-	unsigned vsid : 24;
-	unsigned reserved0 : 1;
-	unsigned api : 6;
+	unsigned int v : 1;
+	unsigned int vsid : 24;
+	unsigned int reserved0 : 1;
+	unsigned int api : 6;
 } ptehi_t;
 
 typedef struct {
-	unsigned rpn : 20;
-	unsigned xpn : 3;
-	unsigned reserved0 : 1;
-	unsigned c : 1;
-	unsigned wimg : 4;
-	unsigned x : 1;
-	unsigned pp : 2;
+	unsigned int rpn : 20;
+	unsigned int xpn : 3;
+	unsigned int reserved0 : 1;
+	unsigned int c : 1;
+	unsigned int wimg : 4;
+	unsigned int x : 1;
+	unsigned int pp : 2;
 } ptelo_t;
 
 extern void pht_init(void);
-extern void pht_refill(int n, istate_t *istate);
-extern bool pht_refill_real(int n, istate_t *istate) __attribute__ ((section("K_UNMAPPED_TEXT_START")));
-extern void tlb_refill_real(int n, uint32_t tlbmiss, ptehi_t ptehi, ptelo_t ptelo, istate_t *istate) __attribute__ ((section("K_UNMAPPED_TEXT_START")));
+extern void pht_refill(int, istate_t *);
+
+extern bool pht_refill_real(int, istate_t *)
+    __attribute__ ((section("K_UNMAPPED_TEXT_START")));
+extern void tlb_refill_real(int, uint32_t, ptehi_t, ptelo_t, istate_t *)
+    __attribute__ ((section("K_UNMAPPED_TEXT_START")));
 
 #endif
Index: kernel/arch/ppc32/src/context.S
===================================================================
--- kernel/arch/ppc32/src/context.S	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/src/context.S	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -29,5 +29,5 @@
 #include <arch/context_offset.h>
 
-.text   
+.text
 
 .global context_save_arch
@@ -46,5 +46,5 @@
 	li r3, 1
 	blr
-	
+
 context_restore_arch:
 	CONTEXT_RESTORE_ARCH_CORE r3
Index: kernel/arch/ppc32/src/ddi/ddi.c
===================================================================
--- kernel/arch/ppc32/src/ddi/ddi.c	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/src/ddi/ddi.c	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -46,4 +46,5 @@
  *
  * @return 0 on success or an error code from errno.h.
+ *
  */
 int ddi_iospace_enable_arch(task_t *task, uintptr_t ioaddr, size_t size)
Index: kernel/arch/ppc32/src/debug/panic.s
===================================================================
--- kernel/arch/ppc32/src/debug/panic.s	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/src/debug/panic.s	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -35,4 +35,4 @@
 	lis %r14, halt@ha
 	addi %r14, %r14, halt@l
-	mtlr %r14	# fake stack to make printf return to halt
+	mtlr %r14  # fake stack to make printf return to halt
 	b printf
Index: kernel/arch/ppc32/src/fpu_context.S
===================================================================
--- kernel/arch/ppc32/src/fpu_context.S	(revision 3d6beaa35f8c97b40779781a9022e244474c064e)
+++ kernel/arch/ppc32/src/fpu_context.S	(revision b8230b99f42baed609487cfaa5737fbb11968cc0)
@@ -30,5 +30,5 @@
 #include <arch/context_offset.h>
 
-.text   
+.text
 
 .global fpu_context_save
@@ -87,5 +87,5 @@
 	
 	blr
-	
+
 fpu_context_restore:
 //	FPU_CONTEXT_LOAD r3
