lkml.org 
[lkml]   [2022]   [Aug]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 5/5] kvm/kvm_main: remove unnecessary (const void*) conversions
Date
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@nfschina.com>
---
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
\
 
 \ /
  Last update: 2022-08-12 12:32    [W:0.895 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site