Index: kernel/test/mm/falloc1.c
===================================================================
--- kernel/test/mm/falloc1.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
+++ kernel/test/mm/falloc1.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -45,19 +45,19 @@
 	if (TEST_RUNS < 2)
 		return "Test is compiled with TEST_RUNS < 2";
-	
+
 	uintptr_t *frames = (uintptr_t *)
 	    malloc(MAX_FRAMES * sizeof(uintptr_t), 0);
 	if (frames == NULL)
 		return "Unable to allocate frames";
-	
+
 	unsigned int results[MAX_FRAMES + 1];
-	
+
 	for (unsigned int run = 0; run < TEST_RUNS; run++) {
 		for (size_t count = 1; count <= MAX_FRAMES; count++) {
 			size_t bytes = FRAMES2SIZE(count);
-			
+
 			TPRINTF("Allocating %zu frames blocks (%zu bytes) ... ",
 			    count, bytes);
-			
+
 			unsigned int allocated = 0;
 			for (unsigned int i = 0; i < (MAX_FRAMES / count); i++) {
@@ -70,7 +70,7 @@
 				}
 			}
-			
+
 			TPRINTF("%d blocks allocated.\n", allocated);
-			
+
 			if (run > 0) {
 				if (results[count] != allocated)
@@ -78,16 +78,16 @@
 			} else
 				results[count] = allocated;
-			
+
 			TPRINTF("Deallocating ... ");
-			
+
 			for (unsigned int i = 0; i < allocated; i++)
 				frame_free(frames[i], count);
-			
+
 			TPRINTF("done.\n");
 		}
 	}
-	
+
 	free(frames);
-	
+
 	return NULL;
 }
Index: kernel/test/mm/falloc2.c
===================================================================
--- kernel/test/mm/falloc2.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
+++ kernel/test/mm/falloc2.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -51,5 +51,5 @@
 {
 	uint8_t val = THREAD->tid % THREADS;
-	
+
 	uintptr_t *frames = (uintptr_t *)
 	    malloc(MAX_FRAMES * sizeof(uintptr_t), FRAME_ATOMIC);
@@ -61,15 +61,15 @@
 		return;
 	}
-	
+
 	thread_detach(THREAD);
-	
+
 	for (unsigned int run = 0; run < THREAD_RUNS; run++) {
 		for (size_t count = 1; count <= MAX_FRAMES; count++) {
 			size_t bytes = FRAMES2SIZE(count);
-			
+
 			TPRINTF("Thread #%" PRIu64 " (cpu%u): "
 			    "Allocating %zu frames blocks (%zu bytes) ... \n", THREAD->tid,
 			    CPU->id, count, bytes);
-			
+
 			unsigned int allocated = 0;
 			for (unsigned int i = 0; i < (MAX_FRAMES / count); i++) {
@@ -81,5 +81,5 @@
 					break;
 			}
-			
+
 			TPRINTF("Thread #%" PRIu64 " (cpu%u): "
 			    "%u blocks allocated.\n", THREAD->tid, CPU->id,
@@ -87,5 +87,5 @@
 			TPRINTF("Thread #%" PRIu64 " (cpu%u): "
 			    "Deallocating ... \n", THREAD->tid, CPU->id);
-			
+
 			for (unsigned int i = 0; i < allocated; i++) {
 				for (size_t k = 0; k < bytes; k++) {
@@ -101,13 +101,13 @@
 				frame_free(frames[i], count);
 			}
-			
+
 			TPRINTF("Thread #%" PRIu64 " (cpu%u): "
 			    "Finished run.\n", THREAD->tid, CPU->id);
 		}
 	}
-	
+
 cleanup:
 	free(frames);
-	
+
 	TPRINTF("Thread #%" PRIu64 " (cpu%u): Exiting\n",
 	    THREAD->tid, CPU->id);
@@ -119,5 +119,5 @@
 	atomic_set(&thread_count, THREADS);
 	atomic_set(&thread_fail, 0);
-	
+
 	for (unsigned int i = 0; i < THREADS; i++) {
 		thread_t *thrd = thread_create(falloc, NULL, TASK,
@@ -129,5 +129,5 @@
 		thread_ready(thrd);
 	}
-	
+
 	while (atomic_get(&thread_count) > 0) {
 		TPRINTF("Threads left: %" PRIua "\n",
@@ -135,8 +135,8 @@
 		thread_sleep(1);
 	}
-	
+
 	if (atomic_get(&thread_fail) == 0)
 		return NULL;
-	
+
 	return "Test failed";
 }
Index: kernel/test/mm/mapping1.c
===================================================================
--- kernel/test/mm/mapping1.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
+++ kernel/test/mm/mapping1.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -42,24 +42,24 @@
 {
 	uintptr_t frame = frame_alloc(1, FRAME_NONE, 0);
-	
+
 	uintptr_t page0 = km_map(frame, FRAME_SIZE,
 	    PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE);
 	TPRINTF("Virtual address %p mapped to physical address %p.\n",
 	    (void *) page0, (void *) frame);
-	
+
 	uintptr_t page1 = km_map(frame, FRAME_SIZE,
 	    PAGE_READ | PAGE_WRITE | PAGE_CACHEABLE);
 	TPRINTF("Virtual address %p mapped to physical address %p.\n",
 	    (void *) page1, (void *) frame);
-	
+
 	for (unsigned int i = 0; i < 2; i++) {
 		TPRINTF("Writing magic using the first virtual address.\n");
-		
+
 		*((uint32_t *) page0) = TEST_MAGIC;
-		
+
 		TPRINTF("Reading magic using the second virtual address.\n");
-		
+
 		uint32_t v = *((uint32_t *) page1);
-		
+
 		if (v != TEST_MAGIC) {
 			km_unmap(page0, PAGE_SIZE);
@@ -68,13 +68,13 @@
 			return "Criss-cross read does not match the value written.";
 		}
-		
+
 		TPRINTF("Writing zero using the second virtual address.\n");
-		
+
 		*((uint32_t *) page1) = 0;
-		
+
 		TPRINTF("Reading zero using the first virtual address.\n");
-		
+
 		v = *((uint32_t *) page0);
-		
+
 		if (v != 0) {
 			km_unmap(page0, PAGE_SIZE);
@@ -84,9 +84,9 @@
 		}
 	}
-	
+
 	km_unmap(page0, PAGE_SIZE);
 	km_unmap(page1, PAGE_SIZE);
 	frame_free(frame, 1);
-	
+
 	return NULL;
 }
Index: kernel/test/mm/purge1.c
===================================================================
--- kernel/test/mm/purge1.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
+++ kernel/test/mm/purge1.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -44,10 +44,10 @@
 	tlb_entry_t entryi;
 	tlb_entry_t entryd;
-	
+
 	int i;
-	
+
 	entryd.word[0] = 0;
 	entryd.word[1] = 0;
-	
+
 	entryd.p = true;                 /* present */
 	entryd.ma = MA_WRITEBACK;
@@ -58,8 +58,8 @@
 	entryd.ppn = 0;
 	entryd.ps = PAGE_WIDTH;
-	
+
 	entryi.word[0] = 0;
 	entryi.word[1] = 0;
-	
+
 	entryi.p = true;                 /* present */
 	entryi.ma = MA_WRITEBACK;
@@ -70,14 +70,14 @@
 	entryi.ppn = 0;
 	entryi.ps = PAGE_WIDTH;
-	
+
 	for (i = 0; i < 100; i++) {
 		itc_mapping_insert(0 + i * (1 << PAGE_WIDTH), 8, entryi);
 		dtc_mapping_insert(0 + i * (1 << PAGE_WIDTH), 9, entryd);
 	}
-	
+
 	tlb_invalidate_pages(8, 0x0c000, 14);
-	
+
 	/* tlb_invalidate_all(); */
-	
+
 	return NULL;
 }
Index: kernel/test/mm/slab1.c
===================================================================
--- kernel/test/mm/slab1.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
+++ kernel/test/mm/slab1.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -42,60 +42,60 @@
 	slab_cache_t *cache;
 	int i;
-	
+
 	TPRINTF("Creating cache, object size: %d.\n", size);
-	
+
 	cache = slab_cache_create("test_cache", size, 0, NULL, NULL,
 	    SLAB_CACHE_NOMAGAZINE);
-	
+
 	TPRINTF("Allocating %d items...", count);
-	
+
 	for (i = 0; i < count; i++) {
 		data[i] = slab_alloc(cache, 0);
 		memsetb(data[i], size, 0);
 	}
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Freeing %d items...", count);
-	
+
 	for (i = 0; i < count; i++)
 		slab_free(cache, data[i]);
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Allocating %d items...", count);
-	
+
 	for (i = 0; i < count; i++) {
 		data[i] = slab_alloc(cache, 0);
 		memsetb(data[i], size, 0);
 	}
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Freeing %d items...", count / 2);
-	
+
 	for (i = count - 1; i >= count / 2; i--)
 		slab_free(cache, data[i]);
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Allocating %d items...", count / 2);
-	
+
 	for (i = count / 2; i < count; i++) {
 		data[i] = slab_alloc(cache, 0);
 		memsetb(data[i], size, 0);
 	}
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Freeing %d items...", count);
-	
+
 	for (i = 0; i < count; i++)
 		slab_free(cache, data[i]);
-	
+
 	TPRINTF("done.\n");
-	
+
 	slab_cache_destroy(cache);
-	
+
 	TPRINTF("Test complete.\n");
 }
@@ -125,9 +125,9 @@
 	int offs = (int) (sysarg_t) data;
 	int i, j;
-	
+
 	thread_detach(THREAD);
-	
+
 	TPRINTF("Starting thread #%" PRIu64 "...\n", THREAD->tid);
-	
+
 	for (j = 0; j < 10; j++) {
 		for (i = 0; i < THR_MEM_COUNT; i++)
@@ -140,7 +140,7 @@
 			slab_free(thr_cache, thr_data[offs][i]);
 	}
-	
+
 	TPRINTF("Thread #%" PRIu64 " finished\n", THREAD->tid);
-	
+
 	semaphore_up(&thr_sem);
 }
@@ -150,8 +150,8 @@
 	thread_t *t;
 	int i;
-	
+
 	thr_cache = slab_cache_create("thread_cache", THR_MEM_SIZE, 0, NULL, NULL,
 	    SLAB_CACHE_NOMAGAZINE);
-	
+
 	semaphore_initialize(&thr_sem, 0);
 	for (i = 0; i < THREADS; i++) {
@@ -164,7 +164,7 @@
 	for (i = 0; i < THREADS; i++)
 		semaphore_down(&thr_sem);
-	
+
 	slab_cache_destroy(thr_cache);
-	
+
 	TPRINTF("Test complete.\n");
 }
@@ -174,5 +174,5 @@
 	testsimple();
 	testthreads();
-	
+
 	return NULL;
 }
Index: kernel/test/mm/slab2.c
===================================================================
--- kernel/test/mm/slab2.c	(revision 3061bc129a855122d429fbba1e623a521aaa164c)
+++ kernel/test/mm/slab2.c	(revision d5e5fd1214ee9617b9a936d6f09efec4c9a91b48)
@@ -48,13 +48,13 @@
 	slab_cache_t *cache2;
 	int i;
-	
+
 	void *data1, *data2;
 	void *olddata1 = NULL, *olddata2 = NULL;
-	
+
 	cache1 = slab_cache_create("test_cache1", ITEM_SIZE, 0, NULL, NULL, 0);
 	cache2 = slab_cache_create("test_cache2", ITEM_SIZE, 0, NULL, NULL, 0);
-	
+
 	TPRINTF("Allocating...");
-	
+
 	/* Use atomic alloc, so that we find end of memory */
 	do {
@@ -75,9 +75,9 @@
 		olddata2 = data2;
 	} while (true);
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Deallocating cache2...");
-	
+
 	/* We do not have memory - now deallocate cache2 */
 	while (olddata2) {
@@ -86,9 +86,9 @@
 		olddata2 = data2;
 	}
-	
+
 	TPRINTF("done.\n");
-	
+
 	TPRINTF("Allocating to cache1...\n");
-	
+
 	for (i = 0; i < 30; i++) {
 		data1 = slab_alloc(cache1, FRAME_ATOMIC);
@@ -109,7 +109,7 @@
 		olddata1 = data1;
 	}
-	
+
 	TPRINTF("Deallocating cache1...");
-	
+
 	while (olddata1) {
 		data1 = *((void **) olddata1);
@@ -117,10 +117,10 @@
 		olddata1 = data1;
 	}
-	
+
 	TPRINTF("done.\n");
-	
+
 	if (!test_quiet)
 		slab_print_list();
-	
+
 	slab_cache_destroy(cache1);
 	slab_cache_destroy(cache2);
@@ -137,16 +137,16 @@
 {
 	void *data = NULL, *new;
-	
+
 	thread_detach(THREAD);
-	
+
 	mutex_lock(&starter_mutex);
 	condvar_wait(&thread_starter,&starter_mutex);
 	mutex_unlock(&starter_mutex);
-	
+
 	TPRINTF("Starting thread #%" PRIu64 "...\n", THREAD->tid);
 
 	/* Alloc all */
 	TPRINTF("Thread #%" PRIu64 " allocating...\n", THREAD->tid);
-	
+
 	while (true) {
 		/* Call with atomic to detect end of memory */
@@ -157,7 +157,7 @@
 		data = new;
 	}
-	
+
 	TPRINTF("Thread #%" PRIu64 " releasing...\n", THREAD->tid);
-	
+
 	while (data) {
 		new = *((void **)data);
@@ -166,7 +166,7 @@
 		data = new;
 	}
-	
+
 	TPRINTF("Thread #%" PRIu64 " allocating...\n", THREAD->tid);
-	
+
 	while (true) {
 		/* Call with atomic to detect end of memory */
@@ -177,7 +177,7 @@
 		data = new;
 	}
-	
+
 	TPRINTF("Thread #%" PRIu64 " releasing...\n", THREAD->tid);
-	
+
 	while (data) {
 		new = *((void **)data);
@@ -186,10 +186,10 @@
 		data = new;
 	}
-	
+
 	TPRINTF("Thread #%" PRIu64 " finished\n", THREAD->tid);
-	
+
 	if (!test_quiet)
 		slab_print_list();
-	
+
 	semaphore_up(&thr_sem);
 }
@@ -202,10 +202,10 @@
 	thread_t *t;
 	int i;
-	
+
 	TPRINTF("Running stress test with size %d\n", size);
-	
+
 	condvar_initialize(&thread_starter);
 	mutex_initialize(&starter_mutex, MUTEX_PASSIVE);
-	
+
 	thr_cache = slab_cache_create("thread_cache", size, 0, NULL, NULL, 0);
 	semaphore_initialize(&thr_sem,0);
@@ -218,8 +218,8 @@
 	thread_sleep(1);
 	condvar_broadcast(&thread_starter);
-	
+
 	for (i = 0; i < THREADS; i++)
 		semaphore_down(&thr_sem);
-	
+
 	slab_cache_destroy(thr_cache);
 	TPRINTF("Stress test complete.\n");
@@ -230,14 +230,14 @@
 	TPRINTF("Running reclaim single-thread test .. pass 1\n");
 	totalmemtest();
-	
+
 	TPRINTF("Running reclaim single-thread test .. pass 2\n");
 	totalmemtest();
-	
+
 	TPRINTF("Reclaim test OK.\n");
-	
+
 	multitest(128);
 	multitest(2048);
 	multitest(8192);
-	
+
 	return NULL;
 }
