From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NfIFB-0001tS-Dj for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:29:01 -0500 Received: from [199.232.76.173] (port=34086 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NfIFB-0001tG-1M for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:29:01 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NfIF8-0005LY-Vi for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:29:00 -0500 Received: from mail-iw0-f194.google.com ([209.85.223.194]:55466) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NfIF8-0005Hu-O0 for qemu-devel@nongnu.org; Wed, 10 Feb 2010 14:28:58 -0500 Received: by mail-iw0-f194.google.com with SMTP id 32so636896iwn.14 for ; Wed, 10 Feb 2010 11:28:58 -0800 (PST) Message-ID: <4B7308F8.9010505@codemonkey.ws> Date: Wed, 10 Feb 2010 13:28:56 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] kvm: reduce code duplication in config_iothread References: <1265294782-28112-1-git-send-email-amit.shah@redhat.com> In-Reply-To: <1265294782-28112-1-git-send-email-amit.shah@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Amit Shah Cc: qemu-devel@nongnu.org On 02/04/2010 08:46 AM, Amit Shah wrote: > We have some duplicated code in the CONFIG_IOTHREAD #ifdef and #else > cases. Fix that. > > Signed-off-by: Amit Shah > Applied. Thanks. Regards, Anthony Liguori > --- > 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, >