* [PATCH] KVM: stats: Remove unnecessary value store
@ 2021-08-10 18:00 Jing Zhang
0 siblings, 0 replies; only message in thread
From: Jing Zhang @ 2021-08-10 18:00 UTC (permalink / raw)
To: KVM, Paolo Bonzini, kernel test robot; +Cc: Jing Zhang, kernel test robot
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(-)
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;
base-commit: d0732b0f8884d9cc0eca0082bbaef043f3fef7fb
--
2.32.0.605.g8dce9f2422-goog
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2021-08-10 18:19 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10 18:00 [PATCH] KVM: stats: Remove unnecessary value store Jing Zhang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.