Index: kernel/generic/src/mm/page.c
===================================================================
--- kernel/generic/src/mm/page.c	(revision d99c1d2ba8c7b2c687d430f2e9fd237046606545)
+++ kernel/generic/src/mm/page.c	(revision 009536837631ac26b2e7a16e52b4c9525d2cd095)
@@ -33,5 +33,5 @@
 /**
  * @file
- * @brief	Virtual Address Translation subsystem.
+ * @brief Virtual Address Translation subsystem.
  *
  * This file contains code for creating, destroying and searching
@@ -39,4 +39,5 @@
  * Functions here are mere wrappers that call the real implementation.
  * They however, define the single interface. 
+ *
  */
 
@@ -55,4 +56,5 @@
  * will do an implicit serialization by virtue of running the TLB shootdown
  * interrupt handler.
+ *
  */
 
@@ -83,18 +85,18 @@
  * of page boundaries.
  *
- * @param s		Address of the structure.
- * @param size		Size of the structure.
+ * @param addr Address of the structure.
+ * @param size Size of the structure.
+ *
  */
-void map_structure(uintptr_t s, size_t size)
+void map_structure(uintptr_t addr, size_t size)
 {
-	int i, cnt, length;
-
-	length = size + (s - (s & ~(PAGE_SIZE - 1)));
-	cnt = length / PAGE_SIZE + (length % PAGE_SIZE > 0);
-
+	size_t length = size + (addr - (addr & ~(PAGE_SIZE - 1)));
+	size_t cnt = length / PAGE_SIZE + (length % PAGE_SIZE > 0);
+	
+	size_t i;
 	for (i = 0; i < cnt; i++)
-		page_mapping_insert(AS_KERNEL, s + i * PAGE_SIZE,
-		    s + i * PAGE_SIZE, PAGE_NOT_CACHEABLE | PAGE_WRITE);
-
+		page_mapping_insert(AS_KERNEL, addr + i * PAGE_SIZE,
+		    addr + i * PAGE_SIZE, PAGE_NOT_CACHEABLE | PAGE_WRITE);
+	
 	/* Repel prefetched accesses to the old mapping. */
 	memory_barrier();
@@ -108,11 +110,13 @@
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as		Address space to wich page belongs.
- * @param page		Virtual address of the page to be mapped.
- * @param frame		Physical address of memory frame to which the mapping is
- * 			done.
- * @param flags		Flags to be used for mapping.
+ * @param as    Address space to wich page belongs.
+ * @param page  Virtual address of the page to be mapped.
+ * @param frame Physical address of memory frame to which the mapping is
+ *              done.
+ * @param flags Flags to be used for mapping.
+ *
  */
-void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame, int flags)
+void page_mapping_insert(as_t *as, uintptr_t page, uintptr_t frame,
+    unsigned int flags)
 {
 	ASSERT(page_mapping_operations);
@@ -133,6 +137,7 @@
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as		Address space to wich page belongs.
- * @param page		Virtual address of the page to be demapped.
+ * @param as   Address space to wich page belongs.
+ * @param page Virtual address of the page to be demapped.
+ *
  */
 void page_mapping_remove(as_t *as, uintptr_t page)
@@ -142,5 +147,5 @@
 	
 	page_mapping_operations->mapping_remove(as, page);
-
+	
 	/* Repel prefetched accesses to the old mapping. */
 	memory_barrier();
@@ -153,9 +158,10 @@
  * The page table must be locked and interrupts must be disabled.
  *
- * @param as		Address space to wich page belongs.
- * @param page		Virtual page.
+ * @param as   Address space to wich page belongs.
+ * @param page Virtual page.
  *
- * @return		NULL if there is no such mapping; requested mapping
- * 			otherwise.
+ * @return NULL if there is no such mapping; requested mapping
+ *         otherwise.
+ *
  */
 pte_t *page_mapping_find(as_t *as, uintptr_t page)
@@ -163,5 +169,5 @@
 	ASSERT(page_mapping_operations);
 	ASSERT(page_mapping_operations->mapping_find);
-
+	
 	return page_mapping_operations->mapping_find(as, page);
 }
