[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-block] [PATCH 2/2] virtio-blk: Inline request init, complete and f
From: |
Fam Zheng |
Subject: |
[Qemu-block] [PATCH 2/2] virtio-blk: Inline request init, complete and free functions |
Date: |
Tue, 7 Feb 2017 21:27:23 +0800 |
These are used in each request handling, inline them.
Signed-off-by: Fam Zheng <address@hidden>
---
hw/block/virtio-blk.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c
index 2858c31..1da9570 100644
--- a/hw/block/virtio-blk.c
+++ b/hw/block/virtio-blk.c
@@ -29,8 +29,8 @@
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
-static void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
- VirtIOBlockReq *req)
+static inline void virtio_blk_init_request(VirtIOBlock *s, VirtQueue *vq,
+ VirtIOBlockReq *req)
{
req->dev = s;
req->vq = vq;
@@ -40,12 +40,13 @@ static void virtio_blk_init_request(VirtIOBlock *s,
VirtQueue *vq,
req->mr_next = NULL;
}
-static void virtio_blk_free_request(VirtIOBlockReq *req)
+static inline void virtio_blk_free_request(VirtIOBlockReq *req)
{
g_free(req);
}
-static void virtio_blk_req_complete(VirtIOBlockReq *req, unsigned char status)
+static inline void virtio_blk_req_complete(VirtIOBlockReq *req,
+ unsigned char status)
{
VirtIOBlock *s = req->dev;
VirtIODevice *vdev = VIRTIO_DEVICE(s);
--
2.9.3