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.
Showing the changes to include/uapi/linux (1 of 1 file). Show all
Unified · Split
| @@ -140,11 +140,11 @@ struct virtio_blk_config { · 139 unmodified lines | |||
| 140 | 140 | ||
| 141 | /* Zoned block device characteristics (if VIRTIO_BLK_F_ZONED) */ | 141 | /* Zoned block device characteristics (if VIRTIO_BLK_F_ZONED) */ |
| 142 | struct virtio_blk_zoned_characteristics { | 142 | struct virtio_blk_zoned_characteristics { |
| 143 | __virtio32 zone_sectors; | 143 | __le32 zone_sectors; |
| 144 | __virtio32 max_open_zones; | 144 | __le32 max_open_zones; |
| 145 | __virtio32 max_active_zones; | 145 | __le32 max_active_zones; |
| 146 | __virtio32 max_append_sectors; | 146 | __le32 max_append_sectors; |
| 147 | __virtio32 write_granularity; | 147 | __le32 write_granularity; |
| 148 | __u8 model; | 148 | __u8 model; |
| 149 | __u8 unused2[3]; | 149 | __u8 unused2[3]; |
| 150 | } zoned; | 150 | } zoned; |
| @@ -241,11 +241,11 @@ struct virtio_blk_outhdr { · 90 unmodified lines | |||
| 241 | */ | 241 | */ |
| 242 | struct virtio_blk_zone_descriptor { | 242 | struct virtio_blk_zone_descriptor { |
| 243 | /* Zone capacity */ | 243 | /* Zone capacity */ |
| 244 | __virtio64 z_cap; | 244 | __le64 z_cap; |
| 245 | /* The starting sector of the zone */ | 245 | /* The starting sector of the zone */ |
| 246 | __virtio64 z_start; | 246 | __le64 z_start; |
| 247 | /* Zone write pointer position in sectors */ | 247 | /* Zone write pointer position in sectors */ |
| 248 | __virtio64 z_wp; | 248 | __le64 z_wp; |
| 249 | /* Zone type */ | 249 | /* Zone type */ |
| 250 | __u8 z_type; | 250 | __u8 z_type; |
| 251 | /* Zone state */ | 251 | /* Zone state */ |
| @@ -254,7 +254,7 @@ struct virtio_blk_zone_descriptor { · 2 unmodified lines | |||
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | struct virtio_blk_zone_report { | 256 | struct virtio_blk_zone_report { |
| 257 | __virtio64 nr_zones; | 257 | __le64 nr_zones; |
| 258 | __u8 reserved[56]; | 258 | __u8 reserved[56]; |
| 259 | struct virtio_blk_zone_descriptor zones[]; | 259 | struct virtio_blk_zone_descriptor zones[]; |
| 260 | }; | 260 | }; |