aboutsummaryrefslogtreecommitdiff
path: root/hw/virtio
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-12-11 22:26:44 +0000
committerPeter Maydell <peter.maydell@linaro.org>2018-12-11 22:26:44 +0000
commit4b3aab204204ca742836219b97b538d90584f4f2 (patch)
treeda51258da51d79b777fd6402ad74e2c4ea26557f /hw/virtio
parentbb9bf94b3e8926553290bc9a7cb84315af422086 (diff)
parent82c48fb79df5596a9d0a3b6d998c4491e542aa7a (diff)
Merge remote-tracking branch 'remotes/vivier2/tags/trivial-patches-pull-request' into staging
Trivial patches (2018-12-11) # gpg: Signature made Tue 11 Dec 2018 18:02:20 GMT # gpg: using RSA key F30C38BD3F2FBE3C # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" # gpg: aka "Laurent Vivier <laurent@vivier.eu>" # gpg: aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F 5173 F30C 38BD 3F2F BE3C * remotes/vivier2/tags/trivial-patches-pull-request: (30 commits) Fixes i386 xchgq test maint: Grammar fix to mailmap MAINTAINERS: Update email address for Fam Zheng cutils: Assert in-range base for string-to-integer conversions util: vfio-helpers: use ARRAY_SIZE in qemu_vfio_init_pci() target: hax: fix errors in comment MAINTAINERS: Use my work email to review Build and test automation patches MAINTAINERS: Add a missing entry for the NVDIMM device MAINTAINERS: Add a missing entry to the QMP section MAINTAINERS: Add a missing entry to SPICE MAINTAINERS: Add missing entries for the MPS2 machine MAINTAINERS: Add missing entries for the Canon DIGIC machine MAINTAINERS: Add missing entries to the vhost section MAINTAINERS: Add missing entries to the PC Chipset section MAINTAINERS: Add a missing entry for the sun4m machines MAINTAINERS: Add a missing entry for the Old World machines MAINTAINERS: Add a missing entry for the Xilinx S3A-DSP 1800 machine MAINTAINERS: Add missing entries for the Jazz machine MAINTAINERS: Add missing entries for the Xilinx ZynqMP machine MAINTAINERS: Add a missing entry to the SPARC CPU ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/virtio')
-rw-r--r--hw/virtio/virtio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 5828ed14df..22bd1ac34e 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -796,13 +796,13 @@ static void virtqueue_undo_map_desc(unsigned int out_num, unsigned int in_num,
}
static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg,
- hwaddr *addr, unsigned int *num_sg,
+ hwaddr *addr, unsigned int num_sg,
int is_write)
{
unsigned int i;
hwaddr len;
- for (i = 0; i < *num_sg; i++) {
+ for (i = 0; i < num_sg; i++) {
len = sg[i].iov_len;
sg[i].iov_base = dma_memory_map(vdev->dma_as,
addr[i], &len, is_write ?
@@ -821,8 +821,8 @@ static void virtqueue_map_iovec(VirtIODevice *vdev, struct iovec *sg,
void virtqueue_map(VirtIODevice *vdev, VirtQueueElement *elem)
{
- virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, &elem->in_num, 1);
- virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, &elem->out_num, 0);
+ virtqueue_map_iovec(vdev, elem->in_sg, elem->in_addr, elem->in_num, 1);
+ virtqueue_map_iovec(vdev, elem->out_sg, elem->out_addr, elem->out_num, 0);
}
static void *virtqueue_alloc_element(size_t sz, unsigned out_num, unsigned in_num)