Re: [PATCH net-next 1/2] Crypto/chcr: Fixes compilations warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Ayush Sawal <ayush.sawal@xxxxxxxxxxx>
Date: Thu, 14 May 2020 13:23:29 +0530

> @@ -256,7 +256,7 @@ static void get_aes_decrypt_key(unsigned char *dec_key,
>  		return;
>  	}
>  	for (i = 0; i < nk; i++)
> -		w_ring[i] = be32_to_cpu(*(u32 *)&key[4 * i]);
> +		w_ring[i] = be32_to_cpu(*(__be32 *)&key[4 * i]);
>  
>  	i = 0;

If the key stored is a big endian value, please fix the type
of ablkctx->key to be __be32 instead of making the driver so
ugly with unnecessary casts all over the place.

This is a really lazy and sloppy way to fix these warnings, and
I'm not applying stuff like this, sorry.



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux