> -----Original Message-----
> From: linux-crypto-ow...@vger.kernel.org <linux-crypto-ow...@vger.kernel.org> 
> On Behalf Of
> Pascal Van Leeuwen
> Sent: Tuesday, July 30, 2019 12:21 PM
> To: Antoine Tenart <antoine.ten...@bootlin.com>; Pascal van Leeuwen 
> <pascalv...@gmail.com>
> Cc: linux-crypto@vger.kernel.org; herb...@gondor.apana.org.au; 
> da...@davemloft.net
> Subject: RE: [PATCHv2 2/3] crypto: inside-secure - add support for PCI based 
> FPGA
> development board
> 
> 
> > > +static int __init crypto_is_init(void)
> > > +{
> > > + int rc;
> > > +
> > > + #if (IS_ENABLED(CONFIG_OF))
> > > +         /* Register platform driver */
> > > +         platform_driver_register(&crypto_safexcel);
> > > + #endif
> >
> > When used in the code directly, you should use:
> >
> >   if (IS_ENABLED(CONFIG_OF))
> >
> Oops, I missed that one, will fix.
> 
Actually, I tried that first, but it doesn't work in this particular case. 
The #if is really necessary here to avoid compile errors due to 
references to datastructures that are within another #if ... (which refer
to functions with the #if etc. so it's a whole dependency chain)

This seemed to be the best way to handle it, but any suggestions that
take into account the big picture are welcome!

> > Thanks!
> > Antoine
> >
> > --
> > Antoine Ténart, Bootlin
> > Embedded Linux and Kernel engineering
> > https://bootlin.com
> 
> Thanks,
> Pascal van Leeuwen
> Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
> www.insidesecure.com

Regards,
Pascal van Leeuwen
Silicon IP Architect, Multi-Protocol Engines @ Verimatrix
www.insidesecure.com

Reply via email to