[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/22] kvm: Remove static return code of kvm_handle_
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH 19/22] kvm: Remove static return code of kvm_handle_io |
Date: |
Thu, 27 Jan 2011 14:10:03 +0100 |
Improve the readability of the exit dispatcher by moving the static
return value of kvm_handle_io to its caller.
Signed-off-by: Jan Kiszka <address@hidden>
---
kvm-all.c | 17 ++++++++---------
1 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index d961697..cf54256 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -770,8 +770,8 @@ err:
return ret;
}
-static int kvm_handle_io(uint16_t port, void *data, int direction, int size,
- uint32_t count)
+static void kvm_handle_io(uint16_t port, void *data, int direction, int size,
+ uint32_t count)
{
int i;
uint8_t *ptr = data;
@@ -805,8 +805,6 @@ static int kvm_handle_io(uint16_t port, void *data, int
direction, int size,
ptr += size;
}
-
- return 1;
}
#ifdef KVM_CAP_INTERNAL_ERROR_DATA
@@ -940,11 +938,12 @@ int kvm_cpu_exec(CPUState *env)
switch (run->exit_reason) {
case KVM_EXIT_IO:
DPRINTF("handle_io\n");
- ret = kvm_handle_io(run->io.port,
- (uint8_t *)run + run->io.data_offset,
- run->io.direction,
- run->io.size,
- run->io.count);
+ kvm_handle_io(run->io.port,
+ (uint8_t *)run + run->io.data_offset,
+ run->io.direction,
+ run->io.size,
+ run->io.count);
+ ret = 1;
break;
case KVM_EXIT_MMIO:
DPRINTF("handle_mmio\n");
--
1.7.1
- Re: [Qemu-devel] Re: [PATCH v3 14/22] kvm: Fix race between timer signals and vcpu entry under !IOTHREAD, (continued)
[Qemu-devel] [PATCH 04/22] Leave inner main_loop faster on pending requests, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 11/22] kvm: Refactor qemu_kvm_eat_signals, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 19/22] kvm: Remove static return code of kvm_handle_io,
Jan Kiszka <=
[Qemu-devel] [PATCH 05/22] kvm: Report proper error on GET_VCPU_MMAP_SIZE failures, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 06/22] kvm: Drop redundant kvm_enabled from kvm_cpu_thread_fn, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 13/22] Set up signalfd under !CONFIG_IOTHREAD, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 16/22] Introduce VCPU self-signaling service, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 02/22] Stop current VCPU on synchronous reset requests, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 08/22] kvm: Provide sigbus services arch-independently, Jan Kiszka, 2011/01/27
[Qemu-devel] [PATCH 01/22] Prevent abortion on multiple VCPU kicks, Jan Kiszka, 2011/01/27