Skip to contentSkip to conversation

virtio_blk: fix endianess annotations

PATCH Applied Christian Borntraeger 2 participants 3 messages May 29, 2008 – May 30, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 virtio_blk: fix endianess annotations

Since commit 72e61eb40b55dd57031ec5971e810649f82b0259 (virtio: change config to guest endian) config space is no longer fixed endian.

Lets change the virtio_blk_config variables.

---
 include/linux/virtio_blk.h |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
include/linux/virtio_blk.h +4 -4
Index: kvm/include/linux/virtio_blk.h
===================================================================
@@ -16,14 +16,14 @@
 struct virtio_blk_config
 {
 	/* The capacity (in 512-byte sectors). */
-	__le64 capacity;
+	__u64 capacity;
 	/* The maximum segment size (if VIRTIO_BLK_F_SIZE_MAX) */
-	__le32 size_max;
+	__u32 size_max;
 	/* The maximum number of segments (if VIRTIO_BLK_F_SEG_MAX) */
-	__le32 seg_max;
+	__u32 seg_max;
 	/* geometry the device (if VIRTIO_BLK_F_GEOMETRY) */
 	struct virtio_blk_geometry {
-		__le16 cylinders;
+		__u16 cylinders;
 		__u8 heads;
 		__u8 sectors;
 	} geometry;
#1 lore raw
Quoted 4 lines · On Thursday 29 May 2008 19:10:01 Christian Borntraeger wrote:

Since commit 72e61eb40b55dd57031ec5971e810649f82b0259 (virtio: change config to guest endian) config space is no longer fixed endian.

Lets change the virtio_blk_config variables.

Applied, thanks,
Rusty.

#2 lore raw
In reply to Christian Borntraeger
Quoted 4 lines · On Thursday 29 May 2008 19:10:01 Christian Borntraeger wrote:

Since commit 72e61eb40b55dd57031ec5971e810649f82b0259 (virtio: change config to guest endian) config space is no longer fixed endian.

Lets change the virtio_blk_config variables.

Applied, thanks,
Rusty.