summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-06-12 21:16:22 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2020-06-18 17:47:16 +1000
commita05b1c150f5bc0f83313a5e14b94725b5eda5f29 (patch)
tree7a8118fd4e6dd5111fcfe545fd530734a29cf293 /drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
parent864c2d57d691b5308dbb8beca73f8ccb9e183409 (diff)
downloadlinux-stable-a05b1c150f5bc0f83313a5e14b94725b5eda5f29.tar.gz
linux-stable-a05b1c150f5bc0f83313a5e14b94725b5eda5f29.tar.bz2
linux-stable-a05b1c150f5bc0f83313a5e14b94725b5eda5f29.zip
crypto: octeontx - Fix sparse warnings
This patch fixes all the sparse warnings in the octeontx driver. Some of these are just trivial type changes. However, some of the changes are non-trivial on little-endian hosts. Obviously the driver appears to be broken on either LE or BE as it was doing different things. I've taken the BE behaviour as the correct one. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c')
-rw-r--r--drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
index fec8f3b9b112..cc103b1bc224 100644
--- a/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
+++ b/drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
@@ -878,11 +878,11 @@ static int copy_ucode_to_dma_mem(struct device *dev,
/* Byte swap 64-bit */
for (i = 0; i < (ucode->size / 8); i++)
- ((u64 *)ucode->align_va)[i] =
+ ((__be64 *)ucode->align_va)[i] =
cpu_to_be64(((u64 *)ucode->align_va)[i]);
/* Ucode needs 16-bit swap */
for (i = 0; i < (ucode->size / 2); i++)
- ((u16 *)ucode->align_va)[i] =
+ ((__be16 *)ucode->align_va)[i] =
cpu_to_be16(((u16 *)ucode->align_va)[i]);
return 0;
}
@@ -1463,8 +1463,8 @@ int otx_cpt_try_create_default_eng_grps(struct pci_dev *pdev,
struct otx_cpt_eng_grps *eng_grps,
int pf_type)
{
- struct tar_ucode_info_t *tar_info[OTX_CPT_MAX_ETYPES_PER_GRP] = { 0 };
- struct otx_cpt_engines engs[OTX_CPT_MAX_ETYPES_PER_GRP] = { {0} };
+ struct tar_ucode_info_t *tar_info[OTX_CPT_MAX_ETYPES_PER_GRP] = {};
+ struct otx_cpt_engines engs[OTX_CPT_MAX_ETYPES_PER_GRP] = {};
struct tar_arch_info_t *tar_arch = NULL;
char *tar_filename;
int i, ret = 0;