[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210812110440.GB5890@gondor.apana.org.au>
Date: Thu, 12 Aug 2021 19:04:40 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Kai Ye <yekai13@...wei.com>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
wangzhou1@...ilicon.com
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@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists