From: Amit Shah <amit.shah@redhat.com>
To: qemu-devel@nongnu.org
Cc: Amit Shah <amit.shah@redhat.com>
Subject: [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread
Date: Thu, 4 Feb 2010 20:16:22 +0530 [thread overview]
Message-ID: <1265294782-28112-1-git-send-email-amit.shah@redhat.com> (raw)
We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else
cases. Fix that.
Signed-off-by: Amit Shah <amit.shah@redhat.com>
---
kvm-all.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/kvm-all.c b/kvm-all.c
index 15ec38e..a2bd78e 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -901,14 +901,11 @@ void kvm_setup_guest_memory(void *start, size_t size)
static void on_vcpu(CPUState *env, void (*func)(void *data), void *data)
{
#ifdef CONFIG_IOTHREAD
- if (env == cpu_single_env) {
- func(data);
- return;
+ if (env != cpu_single_env) {
+ abort();
}
- abort();
-#else
- func(data);
#endif
+ func(data);
}
struct kvm_sw_breakpoint *kvm_find_sw_breakpoint(CPUState *env,
--
1.6.2.5
next reply other threads:[~2010-02-04 14:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-04 14:46 Amit Shah [this message]
2010-02-10 19:28 ` [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread Anthony Liguori
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=1265294782-28112-1-git-send-email-amit.shah@redhat.com \
--to=amit.shah@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).