Index: kernel/generic/src/ipc/irq.c
===================================================================
--- kernel/generic/src/ipc/irq.c	(revision b7fd2a02e4161f4edd38548e7f8456b8021549be)
+++ kernel/generic/src/ipc/irq.c	(revision f1380b76772fb5d1aa03637b5e57bd9b929fea61)
@@ -85,5 +85,5 @@
 	for (size_t i = 0; i < rangecount; i++)
 		pbase[i] = ranges[i].base;
-	
+
 	/* Map the PIO ranges into the kernel virtual address space. */
 	for (size_t i = 0; i < rangecount; i++) {
@@ -100,10 +100,10 @@
 		}
 	}
-	
+
 	/* Rewrite the IRQ code addresses from physical to kernel virtual. */
 	for (size_t i = 0; i < cmdcount; i++) {
 		uintptr_t addr;
 		size_t size;
-		
+
 		/* Process only commands that use an address. */
 		switch (cmds[i].cmd) {
@@ -127,7 +127,7 @@
 			continue;
 		}
-		
+
 		addr = (uintptr_t) cmds[i].addr;
-		
+
 		size_t j;
 		for (j = 0; j < rangecount; j++) {
@@ -135,13 +135,13 @@
 			if (!iswithin(pbase[j], ranges[j].size, addr, size))
 				continue;
-			
+
 			/* Switch the command to a kernel virtual address. */
 			addr -= pbase[j];
 			addr += ranges[j].base;
-			
+
 			cmds[i].addr = (void *) addr;
 			break;
 		}
-		
+
 		if (j == rangecount) {
 			/*
@@ -154,5 +154,5 @@
 		}
 	}
-	
+
 	free(pbase);
 	return EOK;
@@ -172,11 +172,11 @@
 		if (cmds[i].cmd >= CMD_LAST)
 			return EINVAL;
-		
+
 		if (cmds[i].srcarg >= IPC_CALL_LEN)
 			return EINVAL;
-		
+
 		if (cmds[i].dstarg >= IPC_CALL_LEN)
 			return EINVAL;
-		
+
 		switch (cmds[i].cmd) {
 		case CMD_PREDICATE:
@@ -188,5 +188,5 @@
 			if (i + cmds[i].value > cmdcount)
 				return EINVAL;
-			
+
 			break;
 		default:
@@ -194,5 +194,5 @@
 		}
 	}
-	
+
 	return EOK;
 }
@@ -224,14 +224,14 @@
 	irq_pio_range_t *ranges = NULL;
 	irq_cmd_t *cmds = NULL;
-	
+
 	irq_code_t *code = malloc(sizeof(*code), 0);
 	errno_t rc = copy_from_uspace(code, ucode, sizeof(*code));
 	if (rc != EOK)
 		goto error;
-	
+
 	if ((code->rangecount > IRQ_MAX_RANGE_COUNT) ||
 	    (code->cmdcount > IRQ_MAX_PROG_SIZE))
 		goto error;
-	
+
 	ranges = malloc(sizeof(code->ranges[0]) * code->rangecount, 0);
 	rc = copy_from_uspace(ranges, code->ranges,
@@ -239,5 +239,5 @@
 	if (rc != EOK)
 		goto error;
-	
+
 	cmds = malloc(sizeof(code->cmds[0]) * code->cmdcount, 0);
 	rc = copy_from_uspace(cmds, code->cmds,
@@ -245,26 +245,26 @@
 	if (rc != EOK)
 		goto error;
-	
+
 	rc = code_check(cmds, code->cmdcount);
 	if (rc != EOK)
 		goto error;
-	
+
 	rc = ranges_map_and_apply(ranges, code->rangecount, cmds,
 	    code->cmdcount);
 	if (rc != EOK)
 		goto error;
-	
+
 	code->ranges = ranges;
 	code->cmds = cmds;
-	
+
 	return code;
-	
+
 error:
 	if (cmds)
 		free(cmds);
-	
+
 	if (ranges)
 		free(ranges);
-	
+
 	free(code);
 	return NULL;
@@ -275,5 +275,5 @@
 	irq_spinlock_lock(&irq_uspace_hash_table_lock, true);
 	irq_spinlock_lock(&irq->lock, false);
-	
+
 	if (irq->notif_cfg.hashed_in) {
 		/* Remove the IRQ from the uspace IRQ hash table. */
@@ -318,5 +318,5 @@
 	if ((inr < 0) || (inr > last_inr))
 		return ELIMIT;
-	
+
 	irq_code_t *code;
 	if (ucode) {
@@ -326,5 +326,5 @@
 	} else
 		code = NULL;
-	
+
 	/*
 	 * Allocate and populate the IRQ kernel object.
@@ -334,5 +334,5 @@
 	if (rc != EOK)
 		return rc;
-	
+
 	rc = copy_to_uspace(uspace_handle, &handle, sizeof(cap_handle_t));
 	if (rc != EOK) {
@@ -353,5 +353,5 @@
 		return ENOMEM;
 	}
-	
+
 	irq_initialize(irq);
 	irq->inr = inr;
@@ -363,5 +363,5 @@
 	irq->notif_cfg.code = code;
 	irq->notif_cfg.counter = 0;
-	
+
 	/*
 	 * Insert the IRQ structure into the uspace IRQ hash table.
@@ -369,8 +369,8 @@
 	irq_spinlock_lock(&irq_uspace_hash_table_lock, true);
 	irq_spinlock_lock(&irq->lock, false);
-	
+
 	irq->notif_cfg.hashed_in = true;
 	hash_table_insert(&irq_uspace_hash_table, &irq->link);
-	
+
 	irq_spinlock_unlock(&irq->lock, false);
 	irq_spinlock_unlock(&irq_uspace_hash_table_lock, true);
@@ -378,5 +378,5 @@
 	kobject_initialize(kobject, KOBJECT_TYPE_IRQ, irq, &irq_kobject_ops);
 	cap_publish(TASK, handle, kobject);
-	
+
 	return EOK;
 }
@@ -395,5 +395,5 @@
 	if (!kobj)
 		return ENOENT;
-	
+
 	assert(kobj->irq->notif_cfg.answerbox == box);
 
@@ -402,5 +402,5 @@
 	kobject_put(kobj);
 	cap_free(TASK, handle);
-	
+
 	return EOK;
 }
@@ -419,5 +419,5 @@
 	list_append(&call->ab_link, &irq->notif_cfg.answerbox->irq_notifs);
 	irq_spinlock_unlock(&irq->notif_cfg.answerbox->irq_lock, false);
-	
+
 	waitq_wakeup(&irq->notif_cfg.answerbox->wq, WAKEUP_FIRST);
 }
@@ -435,15 +435,15 @@
 	irq_code_t *code = irq->notif_cfg.code;
 	uint32_t *scratch = irq->notif_cfg.scratch;
-	
+
 	if (!irq->notif_cfg.notify)
 		return IRQ_DECLINE;
-	
+
 	if (!code)
 		return IRQ_DECLINE;
-	
+
 	for (size_t i = 0; i < code->cmdcount; i++) {
 		uintptr_t srcarg = code->cmds[i].srcarg;
 		uintptr_t dstarg = code->cmds[i].dstarg;
-		
+
 		switch (code->cmds[i].cmd) {
 		case CMD_PIO_READ_8:
@@ -493,5 +493,5 @@
 			if (scratch[srcarg] == 0)
 				i += code->cmds[i].value;
-			
+
 			break;
 		case CMD_ACCEPT:
@@ -502,5 +502,5 @@
 		}
 	}
-	
+
 	return IRQ_DECLINE;
 }
@@ -516,17 +516,17 @@
 {
 	assert(irq);
-	
+
 	assert(interrupts_disabled());
 	assert(irq_spinlock_locked(&irq->lock));
-	
+
 	if (irq->notif_cfg.answerbox) {
 		call_t *call = ipc_call_alloc(FRAME_ATOMIC);
 		if (!call)
 			return;
-		
+
 		call->flags |= IPC_CALL_NOTIF;
 		/* Put a counter to the message */
 		call->priv = ++irq->notif_cfg.counter;
-		
+
 		/* Set up args */
 		IPC_SET_IMETHOD(call->data, irq->notif_cfg.imethod);
@@ -536,5 +536,5 @@
 		IPC_SET_ARG4(call->data, irq->notif_cfg.scratch[4]);
 		IPC_SET_ARG5(call->data, irq->notif_cfg.scratch[5]);
-		
+
 		send_call(irq, call);
 	}
@@ -555,5 +555,5 @@
 {
 	irq_spinlock_lock(&irq->lock, true);
-	
+
 	if (irq->notif_cfg.answerbox) {
 		call_t *call = ipc_call_alloc(FRAME_ATOMIC);
@@ -562,9 +562,9 @@
 			return;
 		}
-		
+
 		call->flags |= IPC_CALL_NOTIF;
 		/* Put a counter to the message */
 		call->priv = ++irq->notif_cfg.counter;
-		
+
 		IPC_SET_IMETHOD(call->data, irq->notif_cfg.imethod);
 		IPC_SET_ARG1(call->data, a1);
@@ -573,8 +573,8 @@
 		IPC_SET_ARG4(call->data, a4);
 		IPC_SET_ARG5(call->data, a5);
-		
+
 		send_call(irq, call);
 	}
-	
+
 	irq_spinlock_unlock(&irq->lock, true);
 }
