diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2019-05-31 08:39:51 +0200 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2019-06-06 08:38:57 +0200 |
commit | 49d22167f826134e579179aa2217c74647e62015 (patch) | |
tree | 9f440d6203d8872105c2f2669e1e9ee5d44d8aff /drivers/crypto/atmel-i2c.h | |
parent | crypto: lrw - use correct alignmask (diff) | |
download | linux-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.h | 3 |
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; |