KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type
authorXiao Guangrong <guangrong.xiao@intel.com>
Wed, 15 Jul 2015 19:25:55 +0000 (03:25 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jul 2015 06:21:48 +0000 (08:21 +0200)
commit3e5d2fdceda172554e681b68c853bf5d08205bbf
treef6535b9fa1d44563ea348968b11056492e41c107
parent10dc331ff5e7e4668c0f0c95b1a873aba9b70826
KVM: MTRR: simplify kvm_mtrr_get_guest_memory_type

kvm_mtrr_get_guest_memory_type never returns -1 which is implied
in the current code since if @type = -1 (means no MTRR contains the
range), iter.partial_map must be true

Simplify the code to indicate this fact

Signed-off-by: Xiao Guangrong <guangrong.xiao@intel.com>
Tested-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/mtrr.c