summaryrefslogtreecommitdiff
path: root/include/linux/virtio_config.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2020-08-05 14:29:12 +0300
committerMichael S. Tsirkin <mst@redhat.com>2020-08-05 18:08:41 +0300
commit83eb9db95eb453f1db651909ad4598c3d44ef1e1 (patch)
treeb69a38fb6379b4f5667174bb587b03af6f468191 /include/linux/virtio_config.h
parentd83c67c4a669a4b396239c338bef802cae72e648 (diff)
downloadlinux-83eb9db95eb453f1db651909ad4598c3d44ef1e1.tar.xz
virtio_config: drop LE option from config space
All drivers now use virtio_cread/write_le for LE config space fields. Drop LE option from virtio_cread/write, only leaving the option to access transitional fields. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r--include/linux/virtio_config.h28
1 files changed, 2 insertions, 26 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index cc7a2b1fd7b2..ecb166c824bb 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -293,19 +293,7 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
__u8: (x), \
__virtio16: virtio16_to_cpu((vdev), (x)), \
__virtio32: virtio32_to_cpu((vdev), (x)), \
- __virtio64: virtio64_to_cpu((vdev), (x)), \
- /*
- * Why define a default? checker can distinguish between
- * e.g. __u16, __le16 and __virtio16, but GCC can't so
- * attempts to define variants for both look like a duplicate
- * variant to it.
- */ \
- default: _Generic((x), \
- __u8: (x), \
- __le16: virtio16_to_cpu((vdev), (__force __virtio16)(x)), \
- __le32: virtio32_to_cpu((vdev), (__force __virtio32)(x)), \
- __le64: virtio64_to_cpu((vdev), (__force __virtio64)(x)) \
- ) \
+ __virtio64: virtio64_to_cpu((vdev), (x)) \
)
#define cpu_to_virtio(vdev, x, m) \
@@ -313,19 +301,7 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
__u8: (x), \
__virtio16: cpu_to_virtio16((vdev), (x)), \
__virtio32: cpu_to_virtio32((vdev), (x)), \
- __virtio64: cpu_to_virtio64((vdev), (x)), \
- /*
- * Why define a default? checker can distinguish between
- * e.g. __u16, __le16 and __virtio16, but GCC can't so
- * attempts to define variants for both look like a duplicate
- * variant to it.
- */ \
- default: _Generic((m), \
- __u8: (x), \
- __le16: (__force __le16)cpu_to_virtio16((vdev), (x)), \
- __le32: (__force __le32)cpu_to_virtio32((vdev), (x)), \
- __le64: (__force __le64)cpu_to_virtio64((vdev), (x)) \
- ) \
+ __virtio64: cpu_to_virtio64((vdev), (x)) \
)
#define __virtio_native_type(structname, member) \