[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20210810102133.3316768-1-pbonzini@redhat.com>
Date: Tue, 10 Aug 2021 06:21:33 -0400
From: Paolo Bonzini <pbonzini@...hat.com>
To: linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: [PATCH] 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.
Signed-off-by: Paolo Bonzini <pbonzini@...hat.com>
---
virt/kvm/binary_stats.c | 2 --
1 file changed, 2 deletions(-)
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;
--
2.27.0
Powered by blists - more mailing lists