Skip to content

Commit

Permalink
KVM: stats: remove dead stores
Browse files Browse the repository at this point in the history
These stores are copied and pasted from the "if" statements above.
They are dead and while they are not really a bug, they can be
confusing to anyone reading the code as well.  Remove them.

Reported-by: kernel test robot <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
  • Loading branch information
bonzini committed Aug 13, 2021
1 parent 1ccb6f9 commit ee3b6e4
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions virt/kvm/binary_stats.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ ssize_t kvm_stats_read(char *id, const struct kvm_stats_header *header,
src = stats + pos - header->data_offset;
if (copy_to_user(dest, src, copylen))
return -EFAULT;
remain -= copylen;
pos += copylen;
dest += copylen;
}

*offset = pos;
Expand Down

0 comments on commit ee3b6e4

Please sign in to comment.