Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

crypto: sparc - Fix sparse endianness warnings

This patch fixes a coulpe of sparse endianness warnings.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

+6 -5
+1 -1
arch/sparc/crypto/crc32c_glue.c
··· 35 35 36 36 if (keylen != sizeof(u32)) 37 37 return -EINVAL; 38 - *(__le32 *)mctx = le32_to_cpup((__le32 *)key); 38 + *mctx = le32_to_cpup((__le32 *)key); 39 39 return 0; 40 40 } 41 41
+5 -4
arch/sparc/crypto/md5_glue.c
··· 33 33 { 34 34 struct md5_state *mctx = shash_desc_ctx(desc); 35 35 36 - mctx->hash[0] = cpu_to_le32(MD5_H0); 37 - mctx->hash[1] = cpu_to_le32(MD5_H1); 38 - mctx->hash[2] = cpu_to_le32(MD5_H2); 39 - mctx->hash[3] = cpu_to_le32(MD5_H3); 36 + mctx->hash[0] = MD5_H0; 37 + mctx->hash[1] = MD5_H1; 38 + mctx->hash[2] = MD5_H2; 39 + mctx->hash[3] = MD5_H3; 40 + le32_to_cpu_array(mctx->hash, 4); 40 41 mctx->byte_count = 0; 41 42 42 43 return 0;