ia64/xen-unstable

changeset 11818:06ed19691f6d

[IA64] code cleanups

A few more code cleanups

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Tue Oct 17 15:49:05 2006 -0600 (2006-10-17)
parents 78c494a16b95
children 4d86aea44675
files xen/arch/ia64/xen/privop.c
line diff
     1.1 --- a/xen/arch/ia64/xen/privop.c	Tue Oct 17 15:43:41 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/privop.c	Tue Oct 17 15:49:05 2006 -0600
     1.3 @@ -148,9 +148,11 @@ static IA64FAULT priv_itr_d(VCPU * vcpu,
     1.4  
     1.5  	//if (!vcpu_get_psr_ic(vcpu))
     1.6  	//      return IA64_ILLOP_FAULT;
     1.7 -	if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT)
     1.8 +	fault = vcpu_get_itir(vcpu, &itir);
     1.9 +	if (fault != IA64_NO_FAULT)
    1.10  		return IA64_ILLOP_FAULT;
    1.11 -	if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT)
    1.12 +	fault = vcpu_get_ifa(vcpu, &ifa);
    1.13 +	if (fault != IA64_NO_FAULT)
    1.14  		return IA64_ILLOP_FAULT;
    1.15  	pte = vcpu_get_gr(vcpu, inst.M42.r2);
    1.16  	slot = vcpu_get_gr(vcpu, inst.M42.r3);
    1.17 @@ -163,9 +165,11 @@ static IA64FAULT priv_itr_i(VCPU * vcpu,
    1.18  	u64 fault, itir, ifa, pte, slot;
    1.19  
    1.20  	//if (!vcpu_get_psr_ic(vcpu)) return IA64_ILLOP_FAULT;
    1.21 -	if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT)
    1.22 +	fault = vcpu_get_itir(vcpu, &itir);
    1.23 +	if (fault != IA64_NO_FAULT)
    1.24  		return IA64_ILLOP_FAULT;
    1.25 -	if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT)
    1.26 +	fault = vcpu_get_ifa(vcpu, &ifa);
    1.27 +	if (fault != IA64_NO_FAULT)
    1.28  		return IA64_ILLOP_FAULT;
    1.29  	pte = vcpu_get_gr(vcpu, inst.M42.r2);
    1.30  	slot = vcpu_get_gr(vcpu, inst.M42.r3);
    1.31 @@ -178,9 +182,11 @@ static IA64FAULT priv_itc_d(VCPU * vcpu,
    1.32  	u64 fault, itir, ifa, pte;
    1.33  
    1.34  	//if (!vcpu_get_psr_ic(vcpu)) return IA64_ILLOP_FAULT;
    1.35 -	if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT)
    1.36 +	fault = vcpu_get_itir(vcpu, &itir);
    1.37 +	if (fault != IA64_NO_FAULT)
    1.38  		return IA64_ILLOP_FAULT;
    1.39 -	if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT)
    1.40 +	fault = vcpu_get_ifa(vcpu, &ifa);
    1.41 +	if (fault != IA64_NO_FAULT)
    1.42  		return IA64_ILLOP_FAULT;
    1.43  	pte = vcpu_get_gr(vcpu, inst.M41.r2);
    1.44  
    1.45 @@ -192,9 +198,11 @@ static IA64FAULT priv_itc_i(VCPU * vcpu,
    1.46  	u64 fault, itir, ifa, pte;
    1.47  
    1.48  	//if (!vcpu_get_psr_ic(vcpu)) return IA64_ILLOP_FAULT;
    1.49 -	if ((fault = vcpu_get_itir(vcpu, &itir)) != IA64_NO_FAULT)
    1.50 +	fault = vcpu_get_itir(vcpu, &itir);
    1.51 +	if (fault != IA64_NO_FAULT)
    1.52  		return IA64_ILLOP_FAULT;
    1.53 -	if ((fault = vcpu_get_ifa(vcpu, &ifa)) != IA64_NO_FAULT)
    1.54 +	fault = vcpu_get_ifa(vcpu, &ifa);
    1.55 +	if (fault != IA64_NO_FAULT)
    1.56  		return IA64_ILLOP_FAULT;
    1.57  	pte = vcpu_get_gr(vcpu, inst.M41.r2);
    1.58  
    1.59 @@ -516,7 +524,8 @@ static IA64FAULT priv_mov_from_psr(VCPU 
    1.60  	u64 val;
    1.61  	IA64FAULT fault;
    1.62  
    1.63 -	if ((fault = vcpu_get_psr(vcpu, &val)) == IA64_NO_FAULT)
    1.64 +	fault = vcpu_get_psr(vcpu, &val);
    1.65 +	if (fault == IA64_NO_FAULT)
    1.66  		return vcpu_set_gr(vcpu, tgt, val, 0);
    1.67  	else
    1.68  		return fault;