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

From: linmiaohe
Date: Fri Oct 25 2019 - 06:43:34 EST



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.