diff options
author | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 11:32:01 (GMT) |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 11:32:01 (GMT) |
commit | 283a8328ca5b987e547848de8ff0e28edcfb9e08 (patch) | |
tree | b500dbe90c0ebad2ff96ba1b7f0db16089bb3560 /drivers/md/dm-crypt.c | |
parent | d15b774c2920d55e3d58275c97fbe3adc3afde38 (diff) | |
download | linux-283a8328ca5b987e547848de8ff0e28edcfb9e08.tar.xz |
dm: suppress endian warnings
Suppress sparse warnings about cpu_to_le32() by using __le32 types for
on-disk data etc.
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm-crypt.c')
-rw-r--r-- | drivers/md/dm-crypt.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index bae6c4e..f540676 100644 --- a/drivers/md/dm-crypt.c +++ b/drivers/md/dm-crypt.c @@ -239,7 +239,7 @@ static int crypt_iv_plain_gen(struct crypt_config *cc, u8 *iv, struct dm_crypt_request *dmreq) { memset(iv, 0, cc->iv_size); - *(u32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); + *(__le32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); return 0; } @@ -248,7 +248,7 @@ static int crypt_iv_plain64_gen(struct crypt_config *cc, u8 *iv, struct dm_crypt_request *dmreq) { memset(iv, 0, cc->iv_size); - *(u64 *)iv = cpu_to_le64(dmreq->iv_sector); + *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); return 0; } @@ -415,7 +415,7 @@ static int crypt_iv_essiv_gen(struct crypt_config *cc, u8 *iv, struct crypto_cipher *essiv_tfm = this_crypt_config(cc)->iv_private; memset(iv, 0, cc->iv_size); - *(u64 *)iv = cpu_to_le64(dmreq->iv_sector); + *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); crypto_cipher_encrypt_one(essiv_tfm, iv, iv); return 0; |