All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/2] KVM: remove useless check of "ret" variable prior to returning the same value
@ 2015-03-28 22:27 Eugene Korenevsky
  2015-03-30 14:57 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Eugene Korenevsky @ 2015-03-28 22:27 UTC (permalink / raw)
  To: kvm; +Cc: Paolo Bonzini

A trivial code cleanup. This `if` is redundant. 

Signed-off-by: Eugene Korenevsky <ekorenevsky@gmail.com>
---
 arch/x86/kvm/emulate.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 106c015..3a494f3 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -2782,10 +2782,8 @@ static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt,
 		return ret;
 	ret = __load_segment_descriptor(ctxt, tss->gs, VCPU_SREG_GS, cpl,
 					X86_TRANSFER_TASK_SWITCH, NULL);
-	if (ret != X86EMUL_CONTINUE)
-		return ret;
 
-	return X86EMUL_CONTINUE;
+	return ret;
 }
 
 static int task_switch_32(struct x86_emulate_ctxt *ctxt,
-- 
2.0.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH 1/2] KVM: remove useless check of "ret" variable prior to returning the same value
  2015-03-28 22:27 [RFC PATCH 1/2] KVM: remove useless check of "ret" variable prior to returning the same value Eugene Korenevsky
@ 2015-03-30 14:57 ` Paolo Bonzini
  0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2015-03-30 14:57 UTC (permalink / raw)
  To: Eugene Korenevsky, kvm



On 28/03/2015 23:27, Eugene Korenevsky wrote:
> A trivial code cleanup. This `if` is redundant. 
> 
> Signed-off-by: Eugene Korenevsky <ekorenevsky@gmail.com>
> ---
>  arch/x86/kvm/emulate.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 106c015..3a494f3 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -2782,10 +2782,8 @@ static int load_state_from_tss32(struct x86_emulate_ctxt *ctxt,
>  		return ret;
>  	ret = __load_segment_descriptor(ctxt, tss->gs, VCPU_SREG_GS, cpl,
>  					X86_TRANSFER_TASK_SWITCH, NULL);
> -	if (ret != X86EMUL_CONTINUE)
> -		return ret;
>  
> -	return X86EMUL_CONTINUE;
> +	return ret;
>  }
>  
>  static int task_switch_32(struct x86_emulate_ctxt *ctxt,
> 

Applied this one for now.

Paolo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-30 14:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-28 22:27 [RFC PATCH 1/2] KVM: remove useless check of "ret" variable prior to returning the same value Eugene Korenevsky
2015-03-30 14:57 ` Paolo Bonzini

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.