History

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.

Michael S. Tsirkin committed 3 years ago

Commit b16a1751 parent 2a9c8441 file · +9 −9Browse files

Showing the changes to include/uapi/linux (1 of 1 file). Show all

Unified · Split

include/uapi/linux/virtio_blk.h+9−9
@@ -140,11 +140,11 @@ struct virtio_blk_config { · 139 unmodified lines
140140
141141 /* Zoned block device characteristics (if VIRTIO_BLK_F_ZONED) */
142142 struct virtio_blk_zoned_characteristics {
143− __virtio32 zone_sectors;
144− __virtio32 max_open_zones;
145− __virtio32 max_active_zones;
146− __virtio32 max_append_sectors;
147− __virtio32 write_granularity;
143+ __le32 zone_sectors;
144+ __le32 max_open_zones;
145+ __le32 max_active_zones;
146+ __le32 max_append_sectors;
147+ __le32 write_granularity;
148148 __u8 model;
149149 __u8 unused2[3];
150150 } zoned;
@@ -241,11 +241,11 @@ struct virtio_blk_outhdr { · 90 unmodified lines
241241 */
242242 struct virtio_blk_zone_descriptor {
243243 /* Zone capacity */
244− __virtio64 z_cap;
244+ __le64 z_cap;
245245 /* The starting sector of the zone */
246− __virtio64 z_start;
246+ __le64 z_start;
247247 /* Zone write pointer position in sectors */
248− __virtio64 z_wp;
248+ __le64 z_wp;
249249 /* Zone type */
250250 __u8 z_type;
251251 /* Zone state */
@@ -254,7 +254,7 @@ struct virtio_blk_zone_descriptor { · 2 unmodified lines
254254 };
255255
256256 struct virtio_blk_zone_report {
257− __virtio64 nr_zones;
257+ __le64 nr_zones;
258258 __u8 reserved[56];
259259 struct virtio_blk_zone_descriptor zones[];
260260 };