summaryrefslogtreecommitdiff
path: root/drivers/crypto/bcm/spu2.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2021-01-14 09:39:58 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2021-01-22 06:58:01 +0300
commit5a17eae414ab81b268052768bf0fb35b4f4edbec (patch)
treea7c9c4319beea7de460435bfa38338e47bed1d25 /drivers/crypto/bcm/spu2.c
parent660d2062190db131d2feaf19914e90f868fe285c (diff)
downloadlinux-5a17eae414ab81b268052768bf0fb35b4f4edbec.tar.xz
crypto: bcm - Fix sparse warnings
This patch fixes a number of sparse warnings in the bcm driver. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/bcm/spu2.c')
-rw-r--r--drivers/crypto/bcm/spu2.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/crypto/bcm/spu2.c b/drivers/crypto/bcm/spu2.c
index c860ffb0b4c3..2db35b5ccaa2 100644
--- a/drivers/crypto/bcm/spu2.c
+++ b/drivers/crypto/bcm/spu2.c
@@ -964,7 +964,6 @@ u32 spu2_create_request(u8 *spu_hdr,
unsigned int cipher_offset = aead_parms->assoc_size +
aead_parms->aad_pad_len + aead_parms->iv_len;
-#ifdef DEBUG
/* total size of the data following OMD (without STAT word padding) */
unsigned int real_db_size = spu_real_db_size(aead_parms->assoc_size,
aead_parms->iv_len,
@@ -973,7 +972,6 @@ u32 spu2_create_request(u8 *spu_hdr,
aead_parms->aad_pad_len,
aead_parms->data_pad_len,
hash_parms->pad_len);
-#endif
unsigned int assoc_size = aead_parms->assoc_size;
if (req_opts->is_aead &&
@@ -1263,9 +1261,9 @@ void spu2_request_pad(u8 *pad_start, u32 gcm_padding, u32 hash_pad_len,
/* add the size at the end as required per alg */
if (auth_alg == HASH_ALG_MD5)
- *(u64 *)ptr = cpu_to_le64((u64)total_sent * 8);
+ *(__le64 *)ptr = cpu_to_le64(total_sent * 8ull);
else /* SHA1, SHA2-224, SHA2-256 */
- *(u64 *)ptr = cpu_to_be64((u64)total_sent * 8);
+ *(__be64 *)ptr = cpu_to_be64(total_sent * 8ull);
ptr += sizeof(u64);
}