From: Zhengwang Ruan <ruan.zhengwang@xxxxxxxxx> This patch adds brackets for shifted returned value in gfn_to_gpa and pfn_to_hpa. Signed-off-by: Zhengwang Ruan <ruan.zhengwang@xxxxxxxxx> --- include/linux/kvm_host.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 27ac8a4..c4ecfb5 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -748,7 +748,7 @@ static inline unsigned long gfn_to_hva_memslot(struct kvm_memory_slot *slot, static inline gpa_t gfn_to_gpa(gfn_t gfn) { - return (gpa_t)gfn << PAGE_SHIFT; + return (gpa_t)(gfn << PAGE_SHIFT); } static inline gfn_t gpa_to_gfn(gpa_t gpa) @@ -758,7 +758,7 @@ static inline gfn_t gpa_to_gfn(gpa_t gpa) static inline hpa_t pfn_to_hpa(pfn_t pfn) { - return (hpa_t)pfn << PAGE_SHIFT; + return (hpa_t)(pfn << PAGE_SHIFT); } static inline void kvm_migrate_timers(struct kvm_vcpu *vcpu) -- 1.7.4.1 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html