> > Well, I got a complaint from someone that my driver updates for adding
> PCIE
> > support wouldn't compile properly on a platform without a PCI(E)
> subsystem.
> > So I figure I do have to config out the references to PCI specific
> function
> > calls to fix that.
>
> Do you have a link to yo
Le 30/05/2019 à 12:16, Pascal Van Leeuwen a écrit :
Yes. Code and data with static linkage will just be optimized away by
the compiler if the CONFIG_xx option is not enabled, so all you need
to guard are the actual statements, function calls etc.
Ok, makes sense. Then I'll just config out th
On Thu, 30 May 2019 at 12:16, Pascal Van Leeuwen
wrote:
>
> > >> Yes. Code and data with static linkage will just be optimized away by
> > >> the compiler if the CONFIG_xx option is not enabled, so all you need
> > >> to guard are the actual statements, function calls etc.
> > >>
> > > Ok, makes s
> >> Yes. Code and data with static linkage will just be optimized away by
> >> the compiler if the CONFIG_xx option is not enabled, so all you need
> >> to guard are the actual statements, function calls etc.
> >>
> > Ok, makes sense. Then I'll just config out the relevant function bodies
> > and
Pascal Van Leeuwen a écrit :
> Quick question regarding how to configure out code depending on a
CONFIG_xxx
> switch. As far as I understood so far, the proper way to do this is
not by
> doing an #ifdef but by using a regular if with IS_ENABLED like so:
>
> if (IS_ENABLED(CONFIG_PCI)) {
> }
>
>
> > Quick question regarding how to configure out code depending on a
> CONFIG_xxx
> > switch. As far as I understood so far, the proper way to do this is
> not by
> > doing an #ifdef but by using a regular if with IS_ENABLED like so:
> >
> > if (IS_ENABLED(CONFIG_PCI)) {
> > }
> >
> > Such that th
Pascal Van Leeuwen wrote:
> ... the proper way to do this is not by
> doing an #ifdef but by using a regular if with IS_ENABLED like so:
>
> if (IS_ENABLED(CONFIG_PCI)) {}
See also:
http://doc.cat-v.org/henry_spencer/ifdef_considered_harmful
On Tue, 28 May 2019 at 17:47, Pascal Van Leeuwen
wrote:
>
> Hi,
>
> Quick question regarding how to configure out code depending on a CONFIG_xxx
> switch. As far as I understood so far, the proper way to do this is not by
> doing an #ifdef but by using a regular if with IS_ENABLED like so:
>
> if