Re: [tip:x86/apic] x86: Fix out of order gsi -- add remap_ioapic_gsi_to_irq()

From: H. Peter Anvin
Date: Sat Feb 27 2010 - 17:58:19 EST


On 02/27/2010 10:52 AM, Yinghai Lu wrote:
>
> Ingo found:
> | x86: Fix out of order gsi -- add remap_ioapic_gsi_to_irq()
> cause:
> arch/x86/kernel/apic/io_apic.c:1042: error: implicit declaration of function ?remap_ioapic_gsi_to_irq?
>
> actually when !CONFIG_ACPI, we have
> #define acpi_ioapic 0
>
> somehow we still get warning for
> #if (!0) {
> ...
> } else {
> ...
> remap_ioapic_gsi_to_irq...
> }
>
> gcc bug?
>

You're confusing #if and if ( ) { .. }.

Inside an if () { ... } clause the contents still needs to be correct,
even if it will get optimized out.

-hpa


--
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel. I don't speak on their behalf.

--
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/