From: Hollis Blanchard Date: Wed, 02 Apr 2008 16:27:47 +0000 Subject: Re: [kvm-ppc-devel] [PATCH 2 of 2] Add PowerPC KVM guest wait Message-Id: <200804021127.48226.hollisb@us.ibm.com> List-Id: References: <21179d0ab8a62ecc24d1.1206740047@thinkpadL> In-Reply-To: <21179d0ab8a62ecc24d1.1206740047@thinkpadL> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: kvm-ppc@vger.kernel.org You seem to have ignored some of my previous comments, so please go back and address those. On Wednesday 02 April 2008 02:52:02 Jerone Young wrote: > diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c > --- a/arch/powerpc/kvm/powerpc.c > +++ b/arch/powerpc/kvm/powerpc.c > @@ -164,13 +164,12 @@ void kvmppc_dump_vcpu(struct kvm_vcpu *v > > int kvm_cpu_has_interrupt(struct kvm_vcpu *v) > { > - /* XXX implement me */ > - return 0; > + return v->arch.pending_exceptions ? 1 : 0; > } > > int kvm_arch_vcpu_runnable(struct kvm_vcpu *v) > { > - return 1; > + return (v->arch.msr & MSR_WE) ? 0 : 1; > } I hate ternary operators. Since the return values from these functions are just logical true/false, you can drop the ternary stuff completely. -- Hollis Blanchard IBM Linux Technology Center ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-ppc-devel mailing list kvm-ppc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel