summaryrefslogtreecommitdiff
path: root/drivers/crypto/marvell/cesa/cesa.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-07-31 16:55:40 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-08-21 07:45:27 +0300
commite62291c1d9f4f4398459a3a1a17446428f939b9a (patch)
treea405ac8d51a0e114cd30de83c74970d455ba6da4 /drivers/crypto/marvell/cesa/cesa.h
parentcbdad1f246dd98e6c9c32a6e5212337f542aa7e0 (diff)
downloadlinux-e62291c1d9f4f4398459a3a1a17446428f939b9a.tar.xz
crypto: marvell/cesa - Fix sparse warnings
This patch fixes most sparse warnings in the cesa driver. The only ones remaining are to do with copying data between iomem pointers and SG lists. Most changes are trivial. The following are the noteworthy ones: - Removal of swab in mv_cesa_aes_setkey. This appears to be bogus as everything gets swabbed again later on so for BE this ends up being different from LE. The change takes the LE behaviour as the correct one. - next_dma in mv_cesa_tdma_chain was not swabbed. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au> Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/marvell/cesa/cesa.h')
-rw-r--r--drivers/crypto/marvell/cesa/cesa.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/drivers/crypto/marvell/cesa/cesa.h b/drivers/crypto/marvell/cesa/cesa.h
index 48cab49d2c44..fabfaaccca87 100644
--- a/drivers/crypto/marvell/cesa/cesa.h
+++ b/drivers/crypto/marvell/cesa/cesa.h
@@ -237,7 +237,7 @@ struct mv_cesa_sec_accel_desc {
* Context associated to a cipher operation.
*/
struct mv_cesa_skcipher_op_ctx {
- u32 key[8];
+ __le32 key[8];
u32 iv[4];
};
@@ -250,7 +250,7 @@ struct mv_cesa_skcipher_op_ctx {
*/
struct mv_cesa_hash_op_ctx {
u32 iv[16];
- u32 hash[8];
+ __le32 hash[8];
};
/**
@@ -298,8 +298,14 @@ struct mv_cesa_op_ctx {
*/
struct mv_cesa_tdma_desc {
__le32 byte_cnt;
- __le32 src;
- __le32 dst;
+ union {
+ __le32 src;
+ dma_addr_t src_dma;
+ };
+ union {
+ __le32 dst;
+ dma_addr_t dst_dma;
+ };
__le32 next_dma;
/* Software state */
@@ -504,7 +510,7 @@ struct mv_cesa_hash_ctx {
*/
struct mv_cesa_hmac_ctx {
struct mv_cesa_ctx base;
- u32 iv[16];
+ __be32 iv[16];
};
/**