[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 56/56] Fix parameter type in vhost migration log path
From: |
Michael S. Tsirkin |
Subject: |
[PULL 56/56] Fix parameter type in vhost migration log path |
Date: |
Wed, 10 Jun 2020 00:28:38 -0400 |
From: Raphael Norwitz <raphael.s.norwitz@gmail.com>
The ‘enable’ parameter to the vhost_migration_log() function is given as
an int, but "true"/"false" values are passed in wherever it is invoked.
Inside the function itself it is only ever compared with bool values.
Therefore the parameter value itself should be changed to bool.
Signed-off-by: Raphael Norwitz <raphael.norwitz@nutanix.com>
Message-Id: <CAFubqFtqNZw=Y-ar3N=3zTQi6LkKg_G-7W7OOHHbE7Y1fV7HAQ@mail.gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/virtio/vhost.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c
index aff98a0ede..aa06a36919 100644
--- a/hw/virtio/vhost.c
+++ b/hw/virtio/vhost.c
@@ -809,12 +809,12 @@ err_features:
return r;
}
-static int vhost_migration_log(MemoryListener *listener, int enable)
+static int vhost_migration_log(MemoryListener *listener, bool enable)
{
struct vhost_dev *dev = container_of(listener, struct vhost_dev,
memory_listener);
int r;
- if (!!enable == dev->log_enabled) {
+ if (enable == dev->log_enabled) {
return 0;
}
if (!dev->started) {
--
MST
- [PULL 40/56] Lift max memory slots limit imposed by vhost-user, (continued)
- [PULL 40/56] Lift max memory slots limit imposed by vhost-user, Michael S. Tsirkin, 2020/06/10
- [PULL 41/56] Refactor out libvhost-user fault generation logic, Michael S. Tsirkin, 2020/06/10
- [PULL 42/56] Support ram slot configuration in libvhost-user, Michael S. Tsirkin, 2020/06/10
- [PULL 44/56] Support individual region unmap in libvhost-user, Michael S. Tsirkin, 2020/06/10
- [PULL 45/56] Lift max ram slots limit in libvhost-user, Michael S. Tsirkin, 2020/06/10
- [PULL 46/56] libvhost-user: advertise vring features, Michael S. Tsirkin, 2020/06/10
- [PULL 47/56] hw/pci: Fix crash when running QEMU with "-nic model=rocker", Michael S. Tsirkin, 2020/06/10
- [PULL 48/56] vhost-vsock: add vhost-vsock-common abstraction, Michael S. Tsirkin, 2020/06/10
- [PULL 50/56] virtio: add vhost-user-vsock-pci device, Michael S. Tsirkin, 2020/06/10
- [PULL 55/56] acpi: ged: rename event memory region, Michael S. Tsirkin, 2020/06/10
- [PULL 56/56] Fix parameter type in vhost migration log path,
Michael S. Tsirkin <=
- [PULL 03/56] hw/acpi/nvdimm: add a helper to augment SRAT generation, Michael S. Tsirkin, 2020/06/10
- [PULL 30/56] hw/pci-host/prep: Correct RAVEN bus bridge memory region size, Michael S. Tsirkin, 2020/06/10
- [PULL 04/56] tests/acpi: update expected SRAT files, Michael S. Tsirkin, 2020/06/10
- [PULL 11/56] acpi: move aml builder code for parallel device, Michael S. Tsirkin, 2020/06/10
- [PULL 05/56] qtest: allow DSDT acpi table changes, Michael S. Tsirkin, 2020/06/10
- [PULL 26/56] virtio-balloon: Provide an interface for free page reporting, Michael S. Tsirkin, 2020/06/10
- [PULL 53/56] acpi: madt: skip pci override on pci-less systems., Michael S. Tsirkin, 2020/06/10
- [PULL 43/56] Support adding individual regions in libvhost-user, Michael S. Tsirkin, 2020/06/10
- [PULL 37/56] Add vhost-user helper to get MemoryRegion data, Michael S. Tsirkin, 2020/06/10
- [PULL 52/56] acpi: create acpi-common.c and move madt code, Michael S. Tsirkin, 2020/06/10