diff mbox series

crypto: amlogic - Fix endianness marker

Message ID 20200828071833.GA28003@gondor.apana.org.au (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: amlogic - Fix endianness marker | expand

Commit Message

Herbert Xu Aug. 28, 2020, 7:18 a.m. UTC
The endianness marking on the variable v in meson_cipher is wrong.
It is actually in CPU-order, not little-endian.

This patch fixes it.

Fixes: 3d04158814e7 ("crypto: amlogic - enable working on big...")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Comments

Corentin LABBE Aug. 28, 2020, 11:03 a.m. UTC | #1
On Fri, Aug 28, 2020 at 05:18:33PM +1000, Herbert Xu wrote:
> The endianness marking on the variable v in meson_cipher is wrong.
> It is actually in CPU-order, not little-endian.
> 
> This patch fixes it.
> 
> Fixes: 3d04158814e7 ("crypto: amlogic - enable working on big...")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
> 
> diff --git a/drivers/crypto/amlogic/amlogic-gxl-cipher.c b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
> index d93210726697..fcf3fc0c01d0 100644
> --- a/drivers/crypto/amlogic/amlogic-gxl-cipher.c
> +++ b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
> @@ -99,7 +99,7 @@ static int meson_cipher(struct skcipher_request *areq)
>  	unsigned int keyivlen, ivsize, offset, tloffset;
>  	dma_addr_t phykeyiv;
>  	void *backup_iv = NULL, *bkeyiv;
> -	__le32 v;
> +	u32 v;
>  
>  	algt = container_of(alg, struct meson_alg_template, alg.skcipher);
>  

Hello

Acked-by: Corentin Labbe <clabbe@baylibre.com>
Tested-by: Corentin Labbe <clabbe@baylibre.com>

Thanks
diff mbox series

Patch

diff --git a/drivers/crypto/amlogic/amlogic-gxl-cipher.c b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
index d93210726697..fcf3fc0c01d0 100644
--- a/drivers/crypto/amlogic/amlogic-gxl-cipher.c
+++ b/drivers/crypto/amlogic/amlogic-gxl-cipher.c
@@ -99,7 +99,7 @@  static int meson_cipher(struct skcipher_request *areq)
 	unsigned int keyivlen, ivsize, offset, tloffset;
 	dma_addr_t phykeyiv;
 	void *backup_iv = NULL, *bkeyiv;
-	__le32 v;
+	u32 v;
 
 	algt = container_of(alg, struct meson_alg_template, alg.skcipher);