On Thu, Mar 28, 2013 at 01:40:09PM -0500, Rob Herring wrote:
> On 03/28/2013 09:51 AM, Russell King - ARM Linux wrote:
> > On Thu, Mar 28, 2013 at 09:48:18AM -0500, Rob Herring wrote:
> >> On 03/28/2013 04:41 AM, Maxime Ripard wrote:
> >>> + if (machine_desc->init_irq)
> >>> +         machine_desc->init_irq();
> >>> + else
> >>> +         irqchip_init();
> >>
> >> There needs to be an empty version defined for !OF.
> > 
> > Better:
> > 
> > #ifdef CONFIG_OF
> >     if (!machine_desc->init_irq)
> >             irqchip_init();
> >     else
> > #endif
> 
> Or the new style:
> 
>       if (IS_ENABLED(CONFIG_OF) && !machine_desc->init_irq)
>               irqchip_init();
>       else
> 
> That needs the empty version, but handles your case.

It shouldn't need the empty version at all - because the compiler should
optimize the "true" case away entirely.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to