aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Xu2020-11-27 17:23:29 +1100
committerHerbert Xu2020-12-04 18:13:15 +1100
commitf2d4576a9d38f0a35bc1a5436f5e6e15b6c46aa4 (patch)
tree45d7f0578b64bf74898b9ccbb5c5d2d0f8245daf
parenta1315dcb7b6a7d3a78df848eed5b331a4b3ec28a (diff)
crypto: cpt - Fix sparse warnings in cptpf
This patch fixes a few sparse warnings that were missed in the last round. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r--drivers/crypto/cavium/cpt/cptpf_main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/crypto/cavium/cpt/cptpf_main.c b/drivers/crypto/cavium/cpt/cptpf_main.c
index 24d63bdc5dd2..711b1acdd4e0 100644
--- a/drivers/crypto/cavium/cpt/cptpf_main.c
+++ b/drivers/crypto/cavium/cpt/cptpf_main.c
@@ -244,7 +244,7 @@ cpt_init_fail:
struct ucode_header {
u8 version[CPT_UCODE_VERSION_SZ];
- u32 code_length;
+ __be32 code_length;
u32 data_length;
u64 sram_address;
};
@@ -288,10 +288,10 @@ static int cpt_ucode_load_fw(struct cpt_device *cpt, const u8 *fw, bool is_ae)
/* Byte swap 64-bit */
for (j = 0; j < (mcode->code_size / 8); j++)
- ((u64 *)mcode->code)[j] = cpu_to_be64(((u64 *)mcode->code)[j]);
+ ((__be64 *)mcode->code)[j] = cpu_to_be64(((u64 *)mcode->code)[j]);
/* MC needs 16-bit swap */
for (j = 0; j < (mcode->code_size / 2); j++)
- ((u16 *)mcode->code)[j] = cpu_to_be16(((u16 *)mcode->code)[j]);
+ ((__be16 *)mcode->code)[j] = cpu_to_be16(((u16 *)mcode->code)[j]);
dev_dbg(dev, "mcode->code_size = %u\n", mcode->code_size);
dev_dbg(dev, "mcode->is_ae = %u\n", mcode->is_ae);