Commit b16a1756 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin

virtio_blk: mark all zone fields LE

zone is a virtio 1.x feature so all fields are LE,
they are handled as such, but have mistakenly been labeled
__virtioXX in the header.  This results in a bunch of sparse warnings.

Use the __leXX tags to make sparse happy.

Message-Id: <20221222193214.55146-1-mst@redhat.com>
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
parent 2a9c844e
...@@ -140,11 +140,11 @@ struct virtio_blk_config { ...@@ -140,11 +140,11 @@ struct virtio_blk_config {
/* Zoned block device characteristics (if VIRTIO_BLK_F_ZONED) */ /* Zoned block device characteristics (if VIRTIO_BLK_F_ZONED) */
struct virtio_blk_zoned_characteristics { struct virtio_blk_zoned_characteristics {
__virtio32 zone_sectors; __le32 zone_sectors;
__virtio32 max_open_zones; __le32 max_open_zones;
__virtio32 max_active_zones; __le32 max_active_zones;
__virtio32 max_append_sectors; __le32 max_append_sectors;
__virtio32 write_granularity; __le32 write_granularity;
__u8 model; __u8 model;
__u8 unused2[3]; __u8 unused2[3];
} zoned; } zoned;
...@@ -241,11 +241,11 @@ struct virtio_blk_outhdr { ...@@ -241,11 +241,11 @@ struct virtio_blk_outhdr {
*/ */
struct virtio_blk_zone_descriptor { struct virtio_blk_zone_descriptor {
/* Zone capacity */ /* Zone capacity */
__virtio64 z_cap; __le64 z_cap;
/* The starting sector of the zone */ /* The starting sector of the zone */
__virtio64 z_start; __le64 z_start;
/* Zone write pointer position in sectors */ /* Zone write pointer position in sectors */
__virtio64 z_wp; __le64 z_wp;
/* Zone type */ /* Zone type */
__u8 z_type; __u8 z_type;
/* Zone state */ /* Zone state */
...@@ -254,7 +254,7 @@ struct virtio_blk_zone_descriptor { ...@@ -254,7 +254,7 @@ struct virtio_blk_zone_descriptor {
}; };
struct virtio_blk_zone_report { struct virtio_blk_zone_report {
__virtio64 nr_zones; __le64 nr_zones;
__u8 reserved[56]; __u8 reserved[56];
struct virtio_blk_zone_descriptor zones[]; struct virtio_blk_zone_descriptor zones[];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment