Casting from a pointer of type void * to a pointer of type const void * does not require a cast. Signed-off-by: Li kunyu <kunyu@xxxxxxxxxxxx> --- virt/kvm/kvm_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index f047799bf19b..01883ecd8cc4 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -3278,7 +3278,7 @@ EXPORT_SYMBOL_GPL(kvm_read_guest_cached); int kvm_clear_guest(struct kvm *kvm, gpa_t gpa, unsigned long len) { - const void *zero_page = (const void *) __va(page_to_phys(ZERO_PAGE(0))); + const void *zero_page = __va(page_to_phys(ZERO_PAGE(0))); gfn_t gfn = gpa >> PAGE_SHIFT; int seg; int offset = offset_in_page(gpa); -- 2.18.2