projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
965b535
)
virtio_config: disallow native type fields
author
Michael S. Tsirkin
<mst@redhat.com>
Fri, 10 Jul 2020 11:55:52 +0000
(07:55 -0400)
committer
Michael S. Tsirkin
<mst@redhat.com>
Wed, 5 Aug 2020 15:08:40 +0000
(11:08 -0400)
Transitional devices should all use __virtioXX types (and __leXX for
fields not present in legacy devices).
Modern ones should use __leXX.
_uXX type would be a bug.
Let's prevent that.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
include/linux/virtio_config.h
patch
|
blob
|
history
diff --git
a/include/linux/virtio_config.h
b/include/linux/virtio_config.h
index 64da491936f73db123a58bb3832fa5d7527d292b..c68f58f3bf34a4fb2f642c3085679bcd6f57923d 100644
(file)
--- a/
include/linux/virtio_config.h
+++ b/
include/linux/virtio_config.h
@@
-319,9
+319,8
@@
static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
__virtio_pick_type(x, __u8, __u8, \
__virtio_pick_endian(x, __virtio16, __virtio32, __virtio64, \
__virtio_pick_endian(x, __le16, __le32, __le64, \
- __virtio_pick_endian(x, __u16, __u32, __u64, \
- /* No other type allowed */ \
- (void)0)))))
+ /* No other type allowed */ \
+ (void)0))))
#endif