[PATCH] kill implicit check_acpi_pci() warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've been seeing these in recent -mms:

arch/i386/kernel/setup.c: In function `setup_arch':
arch/i386/kernel/setup.c:1523: warning: implicit declaration of function `check_acpi_pci'

The issue is that the stub check_acpi_pci() is inside an
#ifdef ACPI in the header, while the actual use inside the
.c file is not.  I've elected to take both the extern and
the stub in the header, and take them out of the ACPI #ifdef.

The comment next to the call says the following:

	check_acpi_pci();       /* Checks more than just ACPI actually */

Seems weird to have "_acpi_" in it then, but what do I know?

BTW, I'm running a config with ACPI=n and X86_IO_APIC=y.

---

 work-dave/include/asm-i386/acpi.h |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff -puN arch/i386/kernel/setup.c~kill-implicit-check_acpi_pci-warning arch/i386/kernel/setup.c
diff -puN include/asm-i386/acpi.h~kill-implicit-check_acpi_pci-warning include/asm-i386/acpi.h
--- work/include/asm-i386/acpi.h~kill-implicit-check_acpi_pci-warning	2006-03-16 16:25:59.000000000 -0800
+++ work-dave/include/asm-i386/acpi.h	2006-03-16 16:25:59.000000000 -0800
@@ -128,8 +128,6 @@ extern int acpi_gsi_to_irq(u32 gsi, unsi
 extern int skip_ioapic_setup;
 extern int acpi_skip_timer_override;
 
-extern void check_acpi_pci(void);
-
 static inline void disable_ioapic_setup(void)
 {
 	skip_ioapic_setup = 1;
@@ -142,7 +140,6 @@ static inline int ioapic_setup_disabled(
 
 #else
 static inline void disable_ioapic_setup(void) { }
-static inline void check_acpi_pci(void) { }
 
 #endif
 
@@ -163,6 +160,11 @@ static inline void acpi_disable_pci(void
 
 #endif	/* !CONFIG_ACPI */
 
+#ifdef CONFIG_X86_IO_APIC
+extern void check_acpi_pci(void);
+#else
+static inline void check_acpi_pci(void) { }
+#endif
 
 #ifdef CONFIG_ACPI_SLEEP
 
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux