Skip to content

Commit

Permalink
s390/virtio: change virtio_feature_desc:features type to __le32
Browse files Browse the repository at this point in the history
The feature member of virtio_feature_desc contains little endian
values, given that it contents will be converted with
le32_to_cpu(). The "wrong" __u32 type leads to the sparse warnings
below.
In order to avoid them, use the correct __le32 type instead.

drivers/s390/virtio/virtio_ccw.c:749:14: warning: cast to restricted __le32
drivers/s390/virtio/virtio_ccw.c:762:28: warning: cast to restricted __le32

Acked-by: Halil Pasic <[email protected]>
Acked-by: Cornelia Huck <[email protected]>
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
  • Loading branch information
heicarst authored and Martin Schwidefsky committed May 15, 2017
1 parent efc0c21 commit fb31700
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/s390/virtio/virtio_ccw.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ struct vq_info_block {
} __packed;

struct virtio_feature_desc {
__u32 features;
__le32 features;
__u8 index;
} __packed;

Expand Down

0 comments on commit fb31700

Please sign in to comment.