[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <200811042045.41052.david-b@pacbell.net>
Date: Tue, 4 Nov 2008 21:45:40 -0700
From: David Brownell <david-b@...bell.net>
To: "Mike Frysinger" <vapier.adi@...il.com>
Cc: "Grant Likely" <grant.likely@...retlab.ca>,
"Paulius Zaleckas" <paulius.zaleckas@...tonika.lt>,
netdev@...r.kernel.org, linux-arm-kernel@...ts.arm.linux.org.uk,
linux-embedded@...r.kernel.org,
"Laurent Pinchart" <laurentp@...-semaphore.com>
Subject: Re: [PATCH] phylib: make mdio-gpio work without OF (v2)
On Tuesday 04 November 2008, Mike Frysinger wrote:
> > That's generally the preferred way to handle #ifdeffery.
> > But I could imagine OF isn't (yet?) set up to handle it.
>
> i agree completely with the inclination to do it all in C as you've
> suggested and let the compiler do dead code elimination, but that only
> works if the functions in question are defined everywhere (in other
> words, there's a linux/ api for it). i dont think that's the case for
> OF (which is what you were implying?) ...
Only works if the functions are "declared" everywhere;
the stuff that's included in header files.
A "definition" would be available at link time (except
for inlined functions, in headers). Actual C functions.
If indeed OF functions don't have declarations which are
available on all platforms, that might be worth fixing
to enable this approach to #ifdef elimination.
- Dave
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists