Message ID | 20210810180042.453089-1-jingzhangos@google.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | KVM: stats: Remove unnecessary value store | expand |
diff --git a/virt/kvm/binary_stats.c b/virt/kvm/binary_stats.c index e609d428811a..eefca6c69f51 100644 --- a/virt/kvm/binary_stats.c +++ b/virt/kvm/binary_stats.c @@ -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;
Variables 'remain' and 'dest' don't need to be updated in the end. Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Jing Zhang <jingzhangos@google.com> --- virt/kvm/binary_stats.c | 2 -- 1 file changed, 2 deletions(-) base-commit: d0732b0f8884d9cc0eca0082bbaef043f3fef7fb