Commit caa0e2d0 authored by Michael S. Tsirkin's avatar Michael S. Tsirkin Committed by Rusty Russell

virtio_config: reorder functions

This simply reorders functions in virtio_config
so width access wrapper helpers are all together.
Drops an extra empty line while we are at it.
Signed-off-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent 271c8651
...@@ -298,13 +298,6 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) ...@@ -298,13 +298,6 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
} \ } \
} while(0) } while(0)
static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset)
{
u8 ret;
vdev->config->get(vdev, offset, &ret, sizeof(ret));
return ret;
}
/* Read @count fields, @bytes each. */ /* Read @count fields, @bytes each. */
static inline void __virtio_cread_many(struct virtio_device *vdev, static inline void __virtio_cread_many(struct virtio_device *vdev,
unsigned int offset, unsigned int offset,
...@@ -326,7 +319,6 @@ static inline void __virtio_cread_many(struct virtio_device *vdev, ...@@ -326,7 +319,6 @@ static inline void __virtio_cread_many(struct virtio_device *vdev,
} while (gen != old); } while (gen != old);
} }
static inline void virtio_cread_bytes(struct virtio_device *vdev, static inline void virtio_cread_bytes(struct virtio_device *vdev,
unsigned int offset, unsigned int offset,
void *buf, size_t len) void *buf, size_t len)
...@@ -334,6 +326,13 @@ static inline void virtio_cread_bytes(struct virtio_device *vdev, ...@@ -334,6 +326,13 @@ static inline void virtio_cread_bytes(struct virtio_device *vdev,
__virtio_cread_many(vdev, offset, buf, len, 1); __virtio_cread_many(vdev, offset, buf, len, 1);
} }
static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset)
{
u8 ret;
vdev->config->get(vdev, offset, &ret, sizeof(ret));
return ret;
}
static inline void virtio_cwrite8(struct virtio_device *vdev, static inline void virtio_cwrite8(struct virtio_device *vdev,
unsigned int offset, u8 val) unsigned int offset, u8 val)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment