Re: [PATCH 8/8] imx: serial: add IrDA support to serial driver

From: Oskar Schirmer
Date: Tue Jun 09 2009 - 14:04:32 EST


On Tue, Jun 09, 2009 at 18:07:38 +0100, Alan Cox wrote:
> > Sure, the path will be optimized away, but still
> > the conditional statement is subjected to syntax
> > and scope analysis and gcc will correctly complain
> > that irda_inv_rx is not declared.
>
> Why are only about half of them done this way rather than all ?

Because only half of them use IrDA specific struct fields
directly, thus need to be ifdef'd explicitely.

Like I wrote before, we could replace all the

if (USE_IRDA(x)) ...

with some

#ifdef CONFIG_IRDA
if (x->use_irda) ...

but that way we would have more ifdef's around.
A matter of taste, I'ld say. If you vote for the
latter, we can adjust the patch accordingly, of
course.

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