From: Paolo Bonzini Date: Tue, 10 Aug 2021 10:21:30 +0000 (-0400) Subject: KVM: stats: remove dead stores X-Git-Tag: v5.15-rc1~65^2~60 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ee3b6e41bc26c628b0c06aacd2758a316fe583be;p=thirdparty%2Fkernel%2Flinux.git KVM: stats: remove dead stores 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 Signed-off-by: Paolo Bonzini --- diff --git a/virt/kvm/binary_stats.c b/virt/kvm/binary_stats.c index e609d428811a9..eefca6c69f519 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;