Re: [PATCH] KVM: x86: get rid of odd out jump label in pdptrs_changed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 25/10/19, Paolo Bonzini  wrote:
>On 25/10/19 04:01, Miaohe Lin wrote:
>> -	if (r < 0)
>> -		goto out;
>> -	changed = memcmp(pdpte, vcpu->arch.walk_mmu->pdptrs, sizeof(pdpte)) != 0;
>> -out:
>> +	if (r >= 0)
>> +		changed = memcmp(pdpte, vcpu->arch.walk_mmu->pdptrs,
>> +				 sizeof(pdpte)) != 0;
>>  
>>  	return changed;
>
>Even better:
>
>	if (r < 0)
>		return true;
>
>	return memcmp(...) != 0;
>
>Paolo

Thanks for your suggestion. I will send a patch v2 to complete it. Many thanks.




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux