All of lore.kernel.org
 help / color / mirror / Atom feed
* Strange initialization in  arch/mips/kernel/smtc.c:1094?
@ 2009-02-09 11:19 Rusty Russell
  2009-02-09 11:57 ` Kevin D. Kissell
  0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2009-02-09 11:19 UTC (permalink / raw)
  To: Kevin D. Kissell; +Cc: Ralf Baechle, linux-mips

Latest Linus kernel, but it's been there a while:

static struct irqaction irq_ipi = {
	.handler	= ipi_interrupt,
	.flags		= IRQF_DISABLED,
	.name		= "SMTC_IPI",
	.flags		= IRQF_PERCPU
};

.flags is initialized twice: I'm amazed this even compiles.

Cheers,
Rusty.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Strange initialization in  arch/mips/kernel/smtc.c:1094?
  2009-02-09 11:19 Strange initialization in arch/mips/kernel/smtc.c:1094? Rusty Russell
@ 2009-02-09 11:57 ` Kevin D. Kissell
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin D. Kissell @ 2009-02-09 11:57 UTC (permalink / raw)
  To: Rusty Russell; +Cc: Ralf Baechle, linux-mips

Rusty Russell wrote:
> Latest Linus kernel, but it's been there a while:
>
> static struct irqaction irq_ipi = {
> 	.handler	= ipi_interrupt,
> 	.flags		= IRQF_DISABLED,
> 	.name		= "SMTC_IPI",
> 	.flags		= IRQF_PERCPU
> };
>
> .flags is initialized twice: I'm amazed this even compiles.
>   
I don't know where that came from.  The very earliest versions of smtc.c 
didn't have a declaration initialization at all, but filled the fields 
in setup_cross_vpe_interrupts().  The IRQ was PERCPU since day one.  The 
initial DISABLED state came later.  I'm guessing someone added that 
hastily and didn't notice the pre-existing .flags definition.  I'm 
curious as to which bit(s) are actually set.

          Regards,

          Kevin K.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-09 11:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-09 11:19 Strange initialization in arch/mips/kernel/smtc.c:1094? Rusty Russell
2009-02-09 11:57 ` Kevin D. Kissell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.