lkml.org 
[lkml]   [2021]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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

\
 
 \ /
  Last update: 2021-08-12 13:05    [W:1.099 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site