Skip to content

Commit 2824913

Browse files
likunyurbonzini
authored andcommitted
KVM: Drop unnecessary initialization of "npages" in hva_to_pfn_slow()
The variable is initialized but it is only used after its assignment. Reviewed-by: Sean Christopherson <[email protected]> Signed-off-by: Li kunyu <[email protected]> Message-Id: <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 3d9606b commit 2824913

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

virt/kvm/kvm_main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2518,7 +2518,7 @@ static int hva_to_pfn_slow(unsigned long addr, bool *async, bool write_fault,
25182518
{
25192519
unsigned int flags = FOLL_HWPOISON;
25202520
struct page *page;
2521-
int npages = 0;
2521+
int npages;
25222522

25232523
might_sleep();
25242524

0 commit comments

Comments
 (0)