Skip to content

Commit

Permalink
KVM: Drop unnecessary initialization of "npages" in hva_to_pfn_slow()
Browse files Browse the repository at this point in the history
The variable is initialized but it is only used after its assignment.

Reviewed-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Li kunyu <kunyu@nfschina.com>
Message-Id: <20220819022804.483914-1-kunyu@nfschina.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
Li kunyu authored and Paolo Bonzini committed Aug 19, 2022
1 parent 3d9606b commit 2824913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion virt/kvm/kvm_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 2824913

Please sign in to comment.