Re: [patch 11/13] ioapic: Fix non atomic allocation withinterrupts disabled

From: Jaswinder Singh Rajput
Date: Thu Apr 09 2009 - 11:08:38 EST


Hello Suresh,

I am getting sparse warning from this patch.
If possible, please run sparse before sending the patches.


On Mon, 2009-03-16 at 17:05 -0700, Suresh Siddha wrote:
> plain text document attachment (fix_kmalloc_with_irqs_disabled.patch)
> save_mask_IO_APIC_setup() was using non atomic memory allocation while getting
> called with interrupts disabled. Fix this by splitting this into two different
> function. Allocation part save_IO_APIC_setup() now happens before
> disabling interrupts.
>
> Signed-off-by: Suresh Siddha <suresh.b.siddha@xxxxxxxxx>
> ---
>
> Index: tip/arch/x86/kernel/apic/io_apic.c
> ===================================================================
> --- tip.orig/arch/x86/kernel/apic/io_apic.c
> +++ tip/arch/x86/kernel/apic/io_apic.c
> @@ -902,6 +895,25 @@ nomem:
> return -ENOMEM;
> }
>
> +void mask_IO_APIC_setup(void)
> +{
> + int apic, pin;
> +

arch/x86/kernel/apic/io_apic.c:806:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here

Don't worry you are not alone ;-)

CHECK arch/x86/kernel/apic/io_apic.c
arch/x86/kernel/apic/io_apic.c:544:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:806:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:994:7: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1012:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1440:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1700:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:1994:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here
arch/x86/kernel/apic/io_apic.c:2781:6: warning: symbol 'apic' shadows an earlier one
arch/x86/include/asm/apic.h:352:20: originally declared here

Ingo:
don't you think struct apic *apic is very common name can we find some better name.

--
JSR


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