Messages in this thread | | | Date | Thu, 12 Aug 2021 19:04:40 +0800 | From | Herbert Xu <> | Subject | Re: [PATCH 2/2] crypto: hisilicon/sec - modify the hardware endian configuration |
| |
On Fri, Aug 06, 2021 at 05:58:34PM +0800, Kai Ye wrote: > > + reg &= ~(BIT(1) | BIT(0)); > +#ifndef CONFIG_64BIT > + reg |= BIT(1); > +#endif > + > +#ifndef CONFIG_CPU_LITTLE_ENDIAN > + reg |= BIT(0); > +#endif
Please rewrite these without ifdefs. For example,
if (!IS_ENABLED(CONFIG_64BIT)) reg |= BIT(1); if (!IS_ENABLED(CONFIG_CPU_LITTLE_ENDIAN)) reg |= BIT(0);
I can't vouch for the logic here so please double-check.
Thanks, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
| |