Index: kernel/arch/ia32/include/smp/smp.h
===================================================================
--- kernel/arch/ia32/include/smp/smp.h	(revision 7d07bf31f74e2ee585ca017e2dccbd51c38cad08)
+++ kernel/arch/ia32/include/smp/smp.h	(revision fa8e7d2eafc95dcfd4435b0ca55cbfb76b7b11b5)
@@ -44,8 +44,8 @@
 	bool (*cpu_bootstrap)(index_t i);	/**< Check whether the processor of index i is BSP. */
 	uint8_t (*cpu_apic_id)(index_t i);		/**< Return APIC ID of the processor of index i. */
-	int (*irq_to_pin)(int irq);		/**< Return mapping between irq and APIC pin. */
+	int (*irq_to_pin)(unsigned int irq);		/**< Return mapping between irq and APIC pin. */
 };
 
-extern int smp_irq_to_pin(int irq);
+extern int smp_irq_to_pin(unsigned int irq);
 
 #endif
Index: kernel/arch/ia32/src/smp/apic.c
===================================================================
--- kernel/arch/ia32/src/smp/apic.c	(revision 7d07bf31f74e2ee585ca017e2dccbd51c38cad08)
+++ kernel/arch/ia32/src/smp/apic.c	(revision fa8e7d2eafc95dcfd4435b0ca55cbfb76b7b11b5)
@@ -147,5 +147,5 @@
 {
 	io_apic_id_t idreg;
-	int i;
+	unsigned int i;
 
 	exc_register(VECTOR_APIC_SPUR, "apic_spurious", (iroutine) apic_spurious);
@@ -173,5 +173,5 @@
 	
 		if ((pin = smp_irq_to_pin(i)) != -1)
-			io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE+i, LOPRI);
+			io_apic_change_ioredtbl(pin, DEST_ALL, IVT_IRQBASE + i, LOPRI);
 	}
 	
@@ -535,8 +535,9 @@
 {
 	io_redirection_reg_t reg;
-	int i, pin;
-	
-	for (i=0;i<16;i++) {
-		if (irqmask & (1<<i)) {
+	unsigned int i;
+	int pin;
+	
+	for (i = 0; i < 16; i++) {
+		if (irqmask & (1 << i)) {
 			/*
 			 * Mask the signal input in IO APIC if there is a
@@ -545,7 +546,7 @@
 			pin = smp_irq_to_pin(i);
 			if (pin != -1) {
-				reg.lo = io_apic_read(IOREDTBL + pin*2);
+				reg.lo = io_apic_read(IOREDTBL + pin * 2);
 				reg.masked = true;
-				io_apic_write(IOREDTBL + pin*2, reg.lo);
+				io_apic_write(IOREDTBL + pin * 2, reg.lo);
 			}
 			
@@ -560,9 +561,10 @@
 void io_apic_enable_irqs(uint16_t irqmask)
 {
-	int i, pin;
+	unsigned int i;
+	int pin;
 	io_redirection_reg_t reg;	
 	
-	for (i=0;i<16;i++) {
-		if (irqmask & (1<<i)) {
+	for (i = 0;i < 16; i++) {
+		if (irqmask & (1 << i)) {
 			/*
 			 * Unmask the signal input in IO APIC if there is a
@@ -571,7 +573,7 @@
 			pin = smp_irq_to_pin(i);
 			if (pin != -1) {
-				reg.lo = io_apic_read(IOREDTBL + pin*2);
+				reg.lo = io_apic_read(IOREDTBL + pin * 2);
 				reg.masked = false;
-				io_apic_write(IOREDTBL + pin*2, reg.lo);
+				io_apic_write(IOREDTBL + pin * 2, reg.lo);
 			}
 			
Index: kernel/arch/ia32/src/smp/mps.c
===================================================================
--- kernel/arch/ia32/src/smp/mps.c	(revision 7d07bf31f74e2ee585ca017e2dccbd51c38cad08)
+++ kernel/arch/ia32/src/smp/mps.c	(revision fa8e7d2eafc95dcfd4435b0ca55cbfb76b7b11b5)
@@ -91,5 +91,5 @@
 static bool is_bsp(index_t i);
 static uint8_t get_cpu_apic_id(index_t i);
-static int mps_irq_to_pin(int irq);
+static int mps_irq_to_pin(unsigned int irq);
 
 struct smp_config_operations mps_config_operations = {
@@ -414,9 +414,9 @@
 }
 
-int mps_irq_to_pin(int irq)
+int mps_irq_to_pin(unsigned int irq)
 {
 	unsigned int i;
 	
-	for(i = 0; i < io_intr_entry_cnt; i++) {
+	for (i = 0; i < io_intr_entry_cnt; i++) {
 		if (io_intr_entries[i].src_bus_irq == irq && io_intr_entries[i].intr_type == 0)
 			return io_intr_entries[i].dst_io_apic_pin;
Index: kernel/arch/ia32/src/smp/smp.c
===================================================================
--- kernel/arch/ia32/src/smp/smp.c	(revision 7d07bf31f74e2ee585ca017e2dccbd51c38cad08)
+++ kernel/arch/ia32/src/smp/smp.c	(revision fa8e7d2eafc95dcfd4435b0ca55cbfb76b7b11b5)
@@ -171,5 +171,5 @@
 }
 
-int smp_irq_to_pin(int irq)
+int smp_irq_to_pin(unsigned int irq)
 {
 	ASSERT(ops != NULL);
