Skip to contentSkip to conversation

x86: i8259.c fix style problems

PATCH In review Jaswinder Singh Rajput 3 participants 3 messages Jan 4, 2009 – Jan 7, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: i8259.c fix style problems

Impact: cleanup, fix style problems, more readable

Fixes style problems:
WARNING: Use #include <linux/acpi.h> instead of <asm/acpi.h>
WARNING: Use #include <linux/io.h> instead of <asm/io.h>
WARNING: Use #include <linux/delay.h> instead of <asm/delay.h>
ERROR: code indent should use tabs where possible

total: 1 errors, 3 warnings

---
 arch/x86/kernel/i8259.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
arch/x86/kernel/i8259.c +4 -4
index 4b8a53d..11d5093 100644
@@ -11,15 +11,15 @@
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
 #include <linux/bitops.h>
+#include <linux/acpi.h>
+#include <linux/io.h>
+#include <linux/delay.h>
 
-#include <asm/acpi.h>
 #include <asm/atomic.h>
 #include <asm/system.h>
-#include <asm/io.h>
 #include <asm/timer.h>
 #include <asm/hw_irq.h>
 #include <asm/pgtable.h>
-#include <asm/delay.h>
 #include <asm/desc.h>
 #include <asm/apic.h>
 #include <asm/arch_hooks.h>
@@ -323,7 +323,7 @@ void init_8259A(int auto_eoi)
 	outb_pic(0x11, PIC_MASTER_CMD);	/* ICW1: select 8259A-1 init */
 
 	/* ICW2: 8259A-1 IR0-7 mapped to 0x30-0x37 on x86-64,
-	                       to 0x20-0x27 on i386 */
+	   to 0x20-0x27 on i386 */
 	outb_pic(IRQ0_VECTOR, PIC_MASTER_IMR);
 
 	/* 8259A-1 (the master) has a slave on IR2 */
Signature · 1 line
1.5.5.1
#1 lore raw
Quoted 9 lines · Jaswinder Singh Rajput
arch/x86/kernel/i8259.c +3 -1
@@ -11,15 +11,15 @@
 #include <linux/kernel_stat.h>
 #include <linux/sysdev.h>
 #include <linux/bitops.h>
+#include <linux/acpi.h>
+#include <linux/io.h>
+#include <linux/delay.h>
 
-#include <asm/acpi.h>

arch/x86/kernel/i8259.c line 25

Quoted 10 lines
arch/x86/kernel/i8259.c +0 -2
 #include <asm/atomic.h>
 #include <asm/system.h>
-#include <asm/io.h>
 #include <asm/timer.h>
 #include <asm/hw_irq.h>
 #include <asm/pgtable.h>
-#include <asm/delay.h>
 #include <asm/desc.h>
 #include <asm/apic.h>
 #include <asm/arch_hooks.h>

My feeling is this hunk and the following one should be submitted as
separate patches.

arch/x86/kernel/i8259.c void init_8259A(int auto_eoi) · line 329

Quoted 9 lines
arch/x86/kernel/i8259.c +1 -1
@@ -323,7 +323,7 @@ void init_8259A(int auto_eoi)
 	outb_pic(0x11, PIC_MASTER_CMD);	/* ICW1: select 8259A-1 init */
 
 	/* ICW2: 8259A-1 IR0-7 mapped to 0x30-0x37 on x86-64,
-	                       to 0x20-0x27 on i386 */
+	   to 0x20-0x27 on i386 */
 	outb_pic(IRQ0_VECTOR, PIC_MASTER_IMR);
 
 	/* 8259A-1 (the master) has a slave on IR2 */

I think the original formatting is more readable; I would align the two
'to's vertically even. You can fix the comment to adhere to the Linux coding standard though and the whitespace "problem" will vanish automagically.

Maciej

#2 lore raw
Quoted 8 lines · Maciej W. Rozycki
Quoted 8 lines
arch/x86/kernel/i8259.c +1 -1
@@ -323,7 +323,7 @@ void init_8259A(int auto_eoi)
 	outb_pic(0x11, PIC_MASTER_CMD);	/* ICW1: select 8259A-1 init */
 
 	/* ICW2: 8259A-1 IR0-7 mapped to 0x30-0x37 on x86-64,
-	                       to 0x20-0x27 on i386 */
+	   to 0x20-0x27 on i386 */
 	outb_pic(IRQ0_VECTOR, PIC_MASTER_IMR);
 
Quoted 6 lines

arch/x86/kernel/i8259.c void init_8259A(int auto_eoi) · line 329

Quoted 1 line
arch/x86/kernel/i8259.c +0 -0
 	/* 8259A-1 (the master) has a slave on IR2 */

I think the original formatting is more readable; I would align the two
'to's vertically even. You can fix the comment to adhere to the Linux coding standard though and the whitespace "problem" will vanish automagically.

yep, this should be:

/*
* ICW2: 8259A-1 IR0-7 mapped to:
*
* - 0x20-0x27 on 32-bit
* - 0x30-0x37 on 64-bit
*/

Ingo