search for: virtio_le_to_cpu

Displaying 3 results from an estimated 3 matches for "virtio_le_to_cpu".

2020 Aug 05
1
[vhost:vhost 32/52] include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast
...;> include/linux/typecheck.h:12:18: warning: comparison of distinct pointer types lacks a cast 12 | (void)(&__dummy == &__dummy2); \ | ^~ include/linux/virtio_config.h:405:3: note: in expansion of macro 'typecheck' 405 | typecheck(typeof(virtio_le_to_cpu(virtio_cread_v)), *(ptr)); \ | ^~~~~~~~~ drivers/virtio/virtio_input.c:247:3: note: in expansion of macro 'virtio_cread_le' 247 | virtio_cread_le(vi->vdev, struct virtio_input_config, | ^~~~~~~~~~~~~~~ >> include/linux/typecheck.h:12:18: warning: com...
2020 Aug 05
0
[PATCH v3 26/38] virtio_config: LE config space accessors
...++ b/include/linux/virtio_config.h @@ -375,6 +375,71 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) sizeof(virtio_cwrite_v)); \ } while(0) +/* + * Nothing virtio-specific about these, but let's worry about generalizing + * these later. + */ +#define virtio_le_to_cpu(x) \ + _Generic((x), \ + __u8: (x), \ + __le16: le16_to_cpu(x), \ + __le32: le32_to_cpu(x), \ + __le64: le64_to_cpu(x) \ + ) + +#define virtio_cpu_to_le(x, m) \ + _Generic((m), \ + __u8: (x), \ + __le16: cpu_to_le16(x), \ + __le32: cpu_to_le32(x), \ + __le64: cpu_to_le64(x) \ + ) +...
2020 Aug 06
0
[vhost:vhost 32/65] drivers/virtio/virtio_input.c:247:3: warning: comparison of distinct pointer types ('typeof (_Generic((virtio_cread_v), __u8: (virtio_cread_v), __le16: (__builtin_constant_p((__u16)((__u16)(__le16)(virtio_cread_v)))
...istinct-pointer-types] virtio_cread_le(vi->vdev, struct virtio_input_config, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/virtio_config.h:405:3: note: expanded from macro 'virtio_cread_le' typecheck(typeof(virtio_le_to_cpu(virtio_cread_v)), *(ptr)); \ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ include/linux/typecheck.h:12:18: note: expanded from macro 'typecheck' (void)(&__dummy == &__dummy2); \ ~~~~~~~~ ^ ~~~~~~~~~ drivers/virtio...