All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org, qemu-devel@nongnu.org
Subject: [PATCH 14/18] kvm: Remove static return code of kvm_handle_io
Date: Mon, 10 Jan 2011 09:32:07 +0100	[thread overview]
Message-ID: <f7f87fe13b72276f62037ce62e10c3a5da75cc98.1294648329.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1294648329.git.jan.kiszka@web.de>
In-Reply-To: <cover.1294648329.git.jan.kiszka@web.de>

From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
---
 kvm-all.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 429ab7a..fb4d73e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -703,8 +703,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;
@@ -738,8 +738,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
@@ -872,11 +870,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


WARNING: multiple messages have this Message-ID (diff)
From: Jan Kiszka <jan.kiszka@web.de>
To: Avi Kivity <avi@redhat.com>, Marcelo Tosatti <mtosatti@redhat.com>
Cc: qemu-devel@nongnu.org, kvm@vger.kernel.org
Subject: [Qemu-devel] [PATCH 14/18] kvm: Remove static return code of kvm_handle_io
Date: Mon, 10 Jan 2011 09:32:07 +0100	[thread overview]
Message-ID: <f7f87fe13b72276f62037ce62e10c3a5da75cc98.1294648329.git.jan.kiszka@web.de> (raw)
In-Reply-To: <cover.1294648329.git.jan.kiszka@web.de>
In-Reply-To: <cover.1294648329.git.jan.kiszka@web.de>

From: Jan Kiszka <jan.kiszka@siemens.com>

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 <jan.kiszka@siemens.com>
---
 kvm-all.c |   17 ++++++++---------
 1 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/kvm-all.c b/kvm-all.c
index 429ab7a..fb4d73e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -703,8 +703,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;
@@ -738,8 +738,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
@@ -872,11 +870,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

  parent reply	other threads:[~2011-01-10  8:33 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10  8:31 [PATCH 00/18] [uq/master] MCE & IO exit fixes, prepare for VCPU loop reuse Jan Kiszka
2011-01-10  8:31 ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:31 ` [PATCH 01/18] Revert "kvm: Drop return value of kvm_cpu_exec" Jan Kiszka
2011-01-10  8:31   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:31 ` [PATCH 02/18] kvm: Drop redundant kvm_enabled from kvm_cpu_thread_fn Jan Kiszka
2011-01-10  8:31   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:31 ` [PATCH 03/18] kvm: Provide sigbus services arch-independently Jan Kiszka
2011-01-10  8:31   ` [Qemu-devel] " Jan Kiszka
2011-01-10 10:13   ` Paolo Bonzini
2011-01-10 10:13     ` [Qemu-devel] " Paolo Bonzini
2011-01-10 10:30     ` Jan Kiszka
2011-01-10 10:30       ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:31 ` [PATCH 04/18] Refactor signal setup functions in cpus.c Jan Kiszka
2011-01-10  8:31   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:31 ` [PATCH 05/18] kvm: Set up signal mask also for !CONFIG_IOTHREAD Jan Kiszka
2011-01-10  8:31   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:31 ` [PATCH 06/18] kvm: Refactor qemu_kvm_eat_signals Jan Kiszka
2011-01-10  8:31   ` [Qemu-devel] " Jan Kiszka
2011-01-10 10:15   ` Paolo Bonzini
2011-01-10 10:15     ` [Qemu-devel] " Paolo Bonzini
2011-01-10  8:32 ` [PATCH 07/18] kvm: Add MCE signal support for !CONFIG_IOTHREAD Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-24 11:17   ` Marcelo Tosatti
2011-01-24 11:17     ` [Qemu-devel] " Marcelo Tosatti
2011-01-24 12:36     ` Jan Kiszka
2011-01-24 12:36       ` [Qemu-devel] " Jan Kiszka
2011-01-26  8:09       ` Jan Kiszka
2011-01-26  8:09         ` [Qemu-devel] " Jan Kiszka
2011-01-26 12:01         ` Marcelo Tosatti
2011-01-26 12:01           ` [Qemu-devel] " Marcelo Tosatti
2011-01-26 12:06           ` Jan Kiszka
2011-01-26 12:06             ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 08/18] kvm: Handle kvm_init_vcpu errors Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 09/18] Refactor kvm&tcg function names in cpus.c Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 10/18] Fix a few coding style violations " Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 11/18] Introduce VCPU self-signaling service Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-24 11:47   ` Marcelo Tosatti
2011-01-24 11:47     ` [Qemu-devel] " Marcelo Tosatti
2011-01-24 12:36     ` Jan Kiszka
2011-01-24 12:36       ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 12/18] kvm: Move irqchip event processing out of inner loop Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 13/18] kvm: Unconditionally reenter kernel after IO exits Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` Jan Kiszka [this message]
2011-01-10  8:32   ` [Qemu-devel] [PATCH 14/18] kvm: Remove static return code of kvm_handle_io Jan Kiszka
2011-01-10  8:32 ` [PATCH 15/18] kvm: Leave kvm_cpu_exec directly after KVM_EXIT_SHUTDOWN Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 16/18] kvm: Separate TCG from KVM cpu execution Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 17/18] kvm: x86: Prepare VCPU loop for in-kernel irqchip Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10  8:32 ` [PATCH 18/18] kvm: Drop return values from kvm_arch_pre/post_run Jan Kiszka
2011-01-10  8:32   ` [Qemu-devel] " Jan Kiszka
2011-01-10 10:10 ` [PATCH 00/18] [uq/master] MCE & IO exit fixes, prepare for VCPU loop reuse Jan Kiszka
2011-01-10 10:10   ` [Qemu-devel] " Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f7f87fe13b72276f62037ce62e10c3a5da75cc98.1294648329.git.jan.kiszka@web.de \
    --to=jan.kiszka@web.de \
    --cc=avi@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.