summaryrefslogtreecommitdiff
path: root/include/linux/virtio_config.h
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2015-04-01 06:01:20 +0300
committerRusty Russell <rusty@rustcorp.com.au>2015-04-01 07:07:14 +0300
commit012665391dfe12bf8a88d1000e627be012c39dbf (patch)
tree9ea688f55216c24bc42038a70917d181b4037647 /include/linux/virtio_config.h
parentcaa0e2d0e331a04cbc1cb9bca3169c1d94b80838 (diff)
downloadlinux-012665391dfe12bf8a88d1000e627be012c39dbf.tar.xz
virtio: drop a useless config read
"virtio: core support for config generation" fixed reading up 64 bit values, adding generation checks for such reads. By mistake, it left an explicit get call in place as well. the result is that the value is read twice, the first result is discarded. Not a big deal since this only happens with virtio blk and only on boot ATM, so performance isn't affected, but let's clean it up. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r--include/linux/virtio_config.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h
index 22d33034b578..1e306f727edc 100644
--- a/include/linux/virtio_config.h
+++ b/include/linux/virtio_config.h
@@ -373,7 +373,6 @@ static inline u64 virtio_cread64(struct virtio_device *vdev,
unsigned int offset)
{
u64 ret;
- vdev->config->get(vdev, offset, &ret, sizeof(ret));
__virtio_cread_many(vdev, offset, &ret, 1, sizeof(ret));
return virtio64_to_cpu(vdev, (__force __virtio64)ret);
}