diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2015-03-31 17:51:51 -0400 |
|---|---|---|
| committer | Rusty Russell <rusty@rustcorp.com.au> | 2015-04-01 00:07:13 -0400 |
| commit | caa0e2d0e331a04cbc1cb9bca3169c1d94b80838 (patch) | |
| tree | 7b11c5803b58f995e4b8066c0671c6bf3bdd3daf /include | |
| parent | 271c865161c57cfabca45b93eaa712b19da365bc (diff) | |
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: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/virtio_config.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index ca3ed78e5ec7..22d33034b578 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h | |||
| @@ -298,13 +298,6 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val) | |||
| 298 | } \ | 298 | } \ |
| 299 | } while(0) | 299 | } while(0) |
| 300 | 300 | ||
| 301 | static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset) | ||
| 302 | { | ||
| 303 | u8 ret; | ||
| 304 | vdev->config->get(vdev, offset, &ret, sizeof(ret)); | ||
| 305 | return ret; | ||
| 306 | } | ||
| 307 | |||
| 308 | /* Read @count fields, @bytes each. */ | 301 | /* Read @count fields, @bytes each. */ |
| 309 | static inline void __virtio_cread_many(struct virtio_device *vdev, | 302 | static inline void __virtio_cread_many(struct virtio_device *vdev, |
| 310 | unsigned int offset, | 303 | unsigned int offset, |
| @@ -326,7 +319,6 @@ static inline void __virtio_cread_many(struct virtio_device *vdev, | |||
| 326 | } while (gen != old); | 319 | } while (gen != old); |
| 327 | } | 320 | } |
| 328 | 321 | ||
| 329 | |||
| 330 | static inline void virtio_cread_bytes(struct virtio_device *vdev, | 322 | static inline void virtio_cread_bytes(struct virtio_device *vdev, |
| 331 | unsigned int offset, | 323 | unsigned int offset, |
| 332 | void *buf, size_t len) | 324 | void *buf, size_t len) |
| @@ -334,6 +326,13 @@ static inline void virtio_cread_bytes(struct virtio_device *vdev, | |||
| 334 | __virtio_cread_many(vdev, offset, buf, len, 1); | 326 | __virtio_cread_many(vdev, offset, buf, len, 1); |
| 335 | } | 327 | } |
| 336 | 328 | ||
| 329 | static inline u8 virtio_cread8(struct virtio_device *vdev, unsigned int offset) | ||
| 330 | { | ||
| 331 | u8 ret; | ||
| 332 | vdev->config->get(vdev, offset, &ret, sizeof(ret)); | ||
| 333 | return ret; | ||
| 334 | } | ||
| 335 | |||
| 337 | static inline void virtio_cwrite8(struct virtio_device *vdev, | 336 | static inline void virtio_cwrite8(struct virtio_device *vdev, |
| 338 | unsigned int offset, u8 val) | 337 | unsigned int offset, u8 val) |
| 339 | { | 338 | { |
