Messages in this thread | | | Date | Tue, 9 Jun 2009 20:04:16 +0200 | From | Oskar Schirmer <> | Subject | Re: [PATCH 8/8] imx: serial: add IrDA support to serial driver |
| |
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
| |