diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2021-05-24 15:48:08 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2021-05-24 15:48:08 +0100 |
commit | 0dab1d36f55c3ed649bb8e4c74b9269ef3a63049 (patch) | |
tree | 212e624387db446a1bf062305e0851ccac18e4c5 /hw | |
parent | 371ebfe28600fc5a435504b841cd401208a68f07 (diff) | |
parent | 0a6f0c76a030710780ce10d6347a70f098024d21 (diff) | |
download | qemu-0dab1d36f55c3ed649bb8e4c74b9269ef3a63049.zip qemu-0dab1d36f55c3ed649bb8e4c74b9269ef3a63049.tar.gz qemu-0dab1d36f55c3ed649bb8e4c74b9269ef3a63049.tar.bz2 |
Merge remote-tracking branch 'remotes/stefanha-gitlab/tags/block-pull-request' into staging
Pull request
(Resent due to an email preparation mistake.)
# gpg: Signature made Mon 24 May 2021 14:01:42 BST
# gpg: using RSA key 8695A8BFD3F97CDAAC35775A9CA4ABB381AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" [full]
# gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" [full]
# Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35 775A 9CA4 ABB3 81AB 73C8
* remotes/stefanha-gitlab/tags/block-pull-request:
coroutine-sleep: introduce qemu_co_sleep
coroutine-sleep: replace QemuCoSleepState pointer with struct in the API
coroutine-sleep: move timer out of QemuCoSleepState
coroutine-sleep: allow qemu_co_sleep_wake that wakes nothing
coroutine-sleep: disallow NULL QemuCoSleepState** argument
coroutine-sleep: use a stack-allocated timer
bitops.h: Improve find_xxx_bit() documentation
multi-process: Initialize variables declared with g_auto*
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/remote/memory.c | 5 | ||||
-rw-r--r-- | hw/remote/proxy.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/hw/remote/memory.c b/hw/remote/memory.c index 2d41746..472ed2a 100644 --- a/hw/remote/memory.c +++ b/hw/remote/memory.c @@ -41,10 +41,9 @@ void remote_sysmem_reconfig(MPQemuMsg *msg, Error **errp) remote_sysmem_reset(); - for (region = 0; region < msg->num_fds; region++) { - g_autofree char *name; + for (region = 0; region < msg->num_fds; region++, suffix++) { + g_autofree char *name = g_strdup_printf("remote-mem-%u", suffix); subregion = g_new(MemoryRegion, 1); - name = g_strdup_printf("remote-mem-%u", suffix++); memory_region_init_ram_from_fd(subregion, NULL, name, sysmem_info->sizes[region], true, msg->fds[region], diff --git a/hw/remote/proxy.c b/hw/remote/proxy.c index 4fa4be0..6dda705 100644 --- a/hw/remote/proxy.c +++ b/hw/remote/proxy.c @@ -347,13 +347,12 @@ static void probe_pci_info(PCIDevice *dev, Error **errp) PCI_BASE_ADDRESS_SPACE_IO : PCI_BASE_ADDRESS_SPACE_MEMORY; if (size) { - g_autofree char *name; + g_autofree char *name = g_strdup_printf("bar-region-%d", i); pdev->region[i].dev = pdev; pdev->region[i].present = true; if (type == PCI_BASE_ADDRESS_SPACE_MEMORY) { pdev->region[i].memory = true; } - name = g_strdup_printf("bar-region-%d", i); memory_region_init_io(&pdev->region[i].mr, OBJECT(pdev), &proxy_mr_ops, &pdev->region[i], name, size); |