Index: kernel/generic/src/ddi/ddi.c
===================================================================
--- kernel/generic/src/ddi/ddi.c	(revision a53ed3a8097360ccf174e8d94fb407db919eb66a)
+++ kernel/generic/src/ddi/ddi.c	(revision f1380b76772fb5d1aa03637b5e57bd9b929fea61)
@@ -79,10 +79,10 @@
 {
 	mutex_lock(&parea_lock);
-	
+
 	/*
 	 * We don't check for overlaps here as the kernel is pretty sane.
 	 */
 	btree_insert(&parea_btree, (btree_key_t) parea->pbase, parea, NULL);
-	
+
 	mutex_unlock(&parea_lock);
 }
@@ -108,8 +108,8 @@
 {
 	assert(TASK);
-	
+
 	if ((phys % FRAME_SIZE) != 0)
 		return EBADMEM;
-	
+
 	/*
 	 * Unprivileged tasks are only allowed to map pareas
@@ -118,20 +118,20 @@
 	bool priv =
 	    ((perm_get(TASK) & PERM_MEM_MANAGER) == PERM_MEM_MANAGER);
-	
+
 	mem_backend_data_t backend_data;
 	backend_data.base = phys;
 	backend_data.frames = pages;
 	backend_data.anonymous = false;
-	
+
 	/*
 	 * Check if the memory region is explicitly enabled
 	 * for mapping by any parea structure.
 	 */
-	
+
 	mutex_lock(&parea_lock);
 	btree_node_t *nodep;
 	parea_t *parea = (parea_t *) btree_search(&parea_btree,
 	    (btree_key_t) phys, &nodep);
-	
+
 	if ((parea != NULL) && (parea->frames >= pages)) {
 		if ((!priv) && (!parea->unpriv)) {
@@ -139,19 +139,19 @@
 			return EPERM;
 		}
-		
+
 		goto map;
 	}
-	
+
 	parea = NULL;
 	mutex_unlock(&parea_lock);
-	
+
 	/*
 	 * Check if the memory region is part of physical
 	 * memory generally enabled for mapping.
 	 */
-	
+
 	irq_spinlock_lock(&zones.lock, true);
 	size_t znum = find_zone(ADDR2PFN(phys), pages, 0);
-	
+
 	if (znum == (size_t) -1) {
 		/*
@@ -161,11 +161,11 @@
 		 */
 		irq_spinlock_unlock(&zones.lock, true);
-		
+
 		if (!priv)
 			return EPERM;
-		
+
 		goto map;
 	}
-	
+
 	if (zones.info[znum].flags & (ZONE_FIRMWARE | ZONE_RESERVED)) {
 		/*
@@ -174,14 +174,14 @@
 		 */
 		irq_spinlock_unlock(&zones.lock, true);
-		
+
 		if (!priv)
 			return EPERM;
-		
+
 		goto map;
 	}
-	
+
 	irq_spinlock_unlock(&zones.lock, true);
 	return ENOENT;
-	
+
 map:
 	if (!as_area_create(TASK->as, flags, FRAMES2SIZE(pages),
@@ -191,20 +191,20 @@
 		 * We report it using ENOMEM.
 		 */
-		
+
 		if (parea != NULL)
 			mutex_unlock(&parea_lock);
-		
+
 		return ENOMEM;
 	}
-	
+
 	/*
 	 * Mapping is created on-demand during page fault.
 	 */
-	
+
 	if (parea != NULL) {
 		parea->mapped = true;
 		mutex_unlock(&parea_lock);
 	}
-	
+
 	return EOK;
 }
@@ -235,10 +235,10 @@
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = physmem_map(ALIGN_DOWN(phys, FRAME_SIZE), pages, flags, &virt,
 	    bound);
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = copy_to_uspace(virt_ptr, &virt, sizeof(virt));
 	if (rc != EOK) {
@@ -246,5 +246,5 @@
 		return rc;
 	}
-	
+
 	return EOK;
 }
@@ -273,9 +273,9 @@
 	if (!(perms & PERM_IO_MANAGER))
 		return EPERM;
-	
+
 	irq_spinlock_lock(&tasks_lock, true);
-	
+
 	task_t *task = task_find_by_id(id);
-	
+
 	if ((!task) || (!container_check(CONTAINER, task->container))) {
 		/*
@@ -287,5 +287,5 @@
 		return ENOENT;
 	}
-	
+
 	/* Lock the task and release the lock protecting tasks_btree. */
 	irq_spinlock_exchange(&tasks_lock, &task->lock);
@@ -314,9 +314,9 @@
 	if (!(perms & PERM_IO_MANAGER))
 		return EPERM;
-	
+
 	irq_spinlock_lock(&tasks_lock, true);
-	
+
 	task_t *task = task_find_by_id(id);
-	
+
 	if ((!task) || (!container_check(CONTAINER, task->container))) {
 		/*
@@ -328,10 +328,10 @@
 		return ENOENT;
 	}
-	
+
 	/* Lock the task and release the lock protecting tasks_btree. */
 	irq_spinlock_exchange(&tasks_lock, &task->lock);
 	errno_t rc = ddi_iospace_disable_arch(task, ioaddr, size);
 	irq_spinlock_unlock(&task->lock, true);
-	
+
 	return rc;
 }
@@ -350,5 +350,5 @@
 	if (rc != EOK)
 		return (sys_errno_t) rc;
-	
+
 	return (sys_errno_t) iospace_enable((task_id_t) arg.task_id,
 	    (uintptr_t) arg.ioaddr, (size_t) arg.size);
@@ -370,5 +370,5 @@
 {
 	assert(TASK);
-	
+
 	// TODO: implement locking of non-anonymous mapping
 	return page_find_mapping(virt, phys);
@@ -380,5 +380,5 @@
 {
 	assert(TASK);
-	
+
 	size_t frames = SIZE2FRAMES(size);
 	if (frames == 0)
@@ -388,10 +388,10 @@
 	if (*phys == 0)
 		return ENOMEM;
-	
+
 	mem_backend_data_t backend_data;
 	backend_data.base = *phys;
 	backend_data.frames = frames;
 	backend_data.anonymous = true;
-	
+
 	if (!as_area_create(TASK->as, map_flags, size,
 	    AS_AREA_ATTR_NONE, &phys_backend, &backend_data, virt, bound)) {
@@ -399,5 +399,5 @@
 		return ENOMEM;
 	}
-	
+
 	return EOK;
 }
@@ -421,12 +421,12 @@
 		 * Non-anonymous DMA mapping
 		 */
-		
+
 		uintptr_t phys;
 		errno_t rc = dmamem_map((uintptr_t) virt_ptr, size, map_flags,
 		    flags, &phys);
-		
+
 		if (rc != EOK)
 			return rc;
-		
+
 		rc = copy_to_uspace(phys_ptr, &phys, sizeof(phys));
 		if (rc != EOK) {
@@ -438,5 +438,5 @@
 		 * Anonymous DMA mapping
 		 */
-		
+
 		uintptr_t constraint;
 		errno_t rc = copy_from_uspace(&constraint, phys_ptr,
@@ -444,10 +444,10 @@
 		if (rc != EOK)
 			return rc;
-		
+
 		uintptr_t virt;
 		rc = copy_from_uspace(&virt, virt_ptr, sizeof(virt));
 		if (rc != EOK)
 			return rc;
-		
+
 		uintptr_t phys;
 		rc = dmamem_map_anonymous(size, constraint, map_flags, flags,
@@ -455,5 +455,5 @@
 		if (rc != EOK)
 			return rc;
-		
+
 		rc = copy_to_uspace(phys_ptr, &phys, sizeof(phys));
 		if (rc != EOK) {
@@ -461,5 +461,5 @@
 			return rc;
 		}
-		
+
 		rc = copy_to_uspace(virt_ptr, &virt, sizeof(virt));
 		if (rc != EOK) {
@@ -468,5 +468,5 @@
 		}
 	}
-	
+
 	return EOK;
 }
