diff options
author | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 07:32:01 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-08-02 07:32:01 -0400 |
commit | 283a8328ca5b987e547848de8ff0e28edcfb9e08 (patch) | |
tree | b500dbe90c0ebad2ff96ba1b7f0db16089bb3560 /drivers/md/dm-crypt.c | |
parent | d15b774c2920d55e3d58275c97fbe3adc3afde38 (diff) |
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 bae6c4e23d3f..f5406766ece3 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, | |||
239 | struct dm_crypt_request *dmreq) | 239 | struct dm_crypt_request *dmreq) |
240 | { | 240 | { |
241 | memset(iv, 0, cc->iv_size); | 241 | memset(iv, 0, cc->iv_size); |
242 | *(u32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); | 242 | *(__le32 *)iv = cpu_to_le32(dmreq->iv_sector & 0xffffffff); |
243 | 243 | ||
244 | return 0; | 244 | return 0; |
245 | } | 245 | } |
@@ -248,7 +248,7 @@ static int crypt_iv_plain64_gen(struct crypt_config *cc, u8 *iv, | |||
248 | struct dm_crypt_request *dmreq) | 248 | struct dm_crypt_request *dmreq) |
249 | { | 249 | { |
250 | memset(iv, 0, cc->iv_size); | 250 | memset(iv, 0, cc->iv_size); |
251 | *(u64 *)iv = cpu_to_le64(dmreq->iv_sector); | 251 | *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); |
252 | 252 | ||
253 | return 0; | 253 | return 0; |
254 | } | 254 | } |
@@ -415,7 +415,7 @@ static int crypt_iv_essiv_gen(struct crypt_config *cc, u8 *iv, | |||
415 | struct crypto_cipher *essiv_tfm = this_crypt_config(cc)->iv_private; | 415 | struct crypto_cipher *essiv_tfm = this_crypt_config(cc)->iv_private; |
416 | 416 | ||
417 | memset(iv, 0, cc->iv_size); | 417 | memset(iv, 0, cc->iv_size); |
418 | *(u64 *)iv = cpu_to_le64(dmreq->iv_sector); | 418 | *(__le64 *)iv = cpu_to_le64(dmreq->iv_sector); |
419 | crypto_cipher_encrypt_one(essiv_tfm, iv, iv); | 419 | crypto_cipher_encrypt_one(essiv_tfm, iv, iv); |
420 | 420 | ||
421 | return 0; | 421 | return 0; |