Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Michael S. Tsirkin and committed by
Rusty Russell
01266539 caa0e2d0

-1
-1
include/linux/virtio_config.h
··· 373 373 unsigned int offset) 374 374 { 375 375 u64 ret; 376 - vdev->config->get(vdev, offset, &ret, sizeof(ret)); 377 376 __virtio_cread_many(vdev, offset, &ret, 1, sizeof(ret)); 378 377 return virtio64_to_cpu(vdev, (__force __virtio64)ret); 379 378 }