[PATCH 1/8] cryptoloop: fix a sparse annotation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



iv is used as a little endian value, so use a __le32 type for it.  Also
move the initialization into the declaration to simplify it a bit.

Signed-off-by: Christoph Hellwig <hch@xxxxxx>
---
 drivers/block/cryptoloop.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/block/cryptoloop.c b/drivers/block/cryptoloop.c
index 3cabc335ae74..1a65dec47b07 100644
--- a/drivers/block/cryptoloop.c
+++ b/drivers/block/cryptoloop.c
@@ -130,8 +130,7 @@ cryptoloop_transfer(struct loop_device *lo, int cmd,
 
 	while (size > 0) {
 		const int sz = min(size, LOOP_IV_SECTOR_SIZE);
-		u32 iv[4] = { 0, };
-		iv[0] = cpu_to_le32(IV & 0xffffffff);
+		__le32 iv[4] = { cpu_to_le32(IV & 0xffffffff), };
 
 		sg_set_page(&sg_in, in_page, sz, in_offs);
 		sg_set_page(&sg_out, out_page, sz, out_offs);
-- 
2.30.2




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux