Re: [PATCH] x86: coding style fixes to arch/x86/kernel/io_apic_32.c

From: Ingo Molnar
Date: Mon Jun 09 2008 - 15:02:34 EST



* Paolo Ciarrocchi <paolo.ciarrocchi@xxxxxxxxx> wrote:

> Before:
> total: 91 errors, 73 warnings, 2850 lines checked
>
> After:
> total: 1 errors, 47 warnings, 2848 lines checked

applied, thanks. A small detail:

> +++ b/arch/x86/kernel/io_apic_32.c
> @@ -37,12 +37,12 @@
> #include <linux/kthread.h>
> #include <linux/jiffies.h> /* time_after() */
>
> -#include <asm/io.h>
> -#include <asm/smp.h>
> +#include <linux/io.h>
> +#include <linux/smp.h>

i suspect checkpatch suggested that asm/smp.h -> linux/smp.h change, but
there was a subtle detail here - asm/smp.h has dual role on x86, it also
carries a fair number of low level details about APIC/SMP details -
which matters on UP IOAPIC.

so the fix below was needed as well.

Ingo

------------->
Subject: build fix to "x86: coding style fixes to arch/x86/kernel/io_apic_32.c"
From: Ingo Molnar <mingo@xxxxxxx>
Date: Mon Jun 09 20:58:55 CEST 2008

io_apic_32.c relied on asm/smp.h include, to pick up lowlevel
arch details:

arch/x86/kernel/io_apic_32.c:75: error: array type has incomplete element type
arch/x86/kernel/io_apic_32.c:79: error: array type has incomplete element type
arch/x86/kernel/io_apic_32.c:152: error: field âentryâ has incomplete type
arch/x86/kernel/io_apic_32.c:156: error: return type is an incomplete type
arch/x86/kernel/io_apic_32.c: In function âioapic_read_entryâ:
arch/x86/kernel/io_apic_32.c:163: warning: âreturnâ with a value, in function returning void
arch/x86/kernel/io_apic_32.c: At top level:

so add it back.

Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
arch/x86/kernel/io_apic_32.c | 2 ++
1 file changed, 2 insertions(+)

Index: linux/arch/x86/kernel/io_apic_32.c
===================================================================
--- linux.orig/arch/x86/kernel/io_apic_32.c
+++ linux/arch/x86/kernel/io_apic_32.c
@@ -39,6 +39,8 @@

#include <linux/io.h>
#include <linux/smp.h>
+
+#include <asm/smp.h>
#include <asm/desc.h>
#include <asm/timer.h>
#include <asm/i8259.h>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/