summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/atmel-i2c.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2019-05-31 08:39:51 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2019-06-06 08:38:57 +0200
commit49d22167f826134e579179aa2217c74647e62015 (patch)
tree9f440d6203d8872105c2f2669e1e9ee5d44d8aff /drivers/crypto/atmel-i2c.h
parentcrypto: lrw - use correct alignmask (diff)
downloadlinux-49d22167f826134e579179aa2217c74647e62015.tar.xz
linux-49d22167f826134e579179aa2217c74647e62015.zip
crypto: atmel - Fix sparse endianness warnings
The param2 member in atmel_i2c_cmd is supposed to be little-endian but was marked as u16. This patch changes it to a __le16 which reveals a missing endian swap in atmel_i2c_init_read_cmd. Another missing little-endian marking is also added in atmel_i2c_checksum. Fixes: 11105693fa05 ("crypto: atmel-ecc - introduce Microchip...") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/atmel-i2c.h')
-rw-r--r--drivers/crypto/atmel-i2c.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/crypto/atmel-i2c.h b/drivers/crypto/atmel-i2c.h
index c6bd43b78f33..21860b99c3e3 100644
--- a/drivers/crypto/atmel-i2c.h
+++ b/drivers/crypto/atmel-i2c.h
@@ -8,6 +8,7 @@
#define __ATMEL_I2C_H__
#include <linux/hw_random.h>
+#include <linux/types.h>
#define ATMEL_ECC_PRIORITY 300
@@ -50,7 +51,7 @@ struct atmel_i2c_cmd {
u8 count;
u8 opcode;
u8 param1;
- u16 param2;
+ __le16 param2;
u8 data[MAX_RSP_SIZE];
u8 msecs;
u16 rxsize;