Commit 28249139 authored by Li kunyu's avatar Li kunyu Committed by Paolo Bonzini

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: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarLi kunyu <kunyu@nfschina.com>
Message-Id: <20220819022804.483914-1-kunyu@nfschina.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 3d9606b0
......@@ -2518,7 +2518,7 @@ static int hva_to_pfn_slow(unsigned long addr, bool *async, bool write_fault,
{
unsigned int flags = FOLL_HWPOISON;
struct page *page;
int npages = 0;
int npages;
might_sleep();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment