From 5446e66dd3df0b07dd1d3554ce3356ae7f6e3fed Mon Sep 17 00:00:00 2001 From: Juan Quintela Date: Tue, 14 Jan 2014 15:07:42 +0100 Subject: [PATCH 31/40] memory: cpu_physical_memory_set_dirty_tracking() should return void RH-Author: Juan Quintela Message-id: <1389712071-23303-32-git-send-email-quintela@redhat.com> Patchwork-id: 56684 O-Subject: [RHEL7 qemu-kvm PATCH 31/40] memory: cpu_physical_memory_set_dirty_tracking() should return void Bugzilla: 997559 RH-Acked-by: Paolo Bonzini RH-Acked-by: Orit Wasserman RH-Acked-by: Dr. David Alan Gilbert (git) Result was always 0, and not used anywhere. Once there, use bool type for the parameter. Signed-off-by: Juan Quintela Reviewed-by: Eric Blake Reviewed-by: Orit Wasserman (cherry picked from commit 981fdf2353d5e708adbe5227260d5e46eececc05) Signed-off-by: Juan Quintela --- exec.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) Signed-off-by: Miroslav Rezanina --- exec.c | 10 ++++------ 1 files changed, 4 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 443de79..2bf71bf 100644 --- a/exec.c +++ b/exec.c @@ -55,7 +55,7 @@ //#define DEBUG_SUBPAGE #if !defined(CONFIG_USER_ONLY) -static int in_migration; +static bool in_migration; RAMList ram_list = { .blocks = QTAILQ_HEAD_INITIALIZER(ram_list.blocks) }; @@ -609,11 +609,9 @@ void cpu_physical_memory_reset_dirty(ram_addr_t start, ram_addr_t length, } } -static int cpu_physical_memory_set_dirty_tracking(int enable) +static void cpu_physical_memory_set_dirty_tracking(bool enable) { - int ret = 0; in_migration = enable; - return ret; } hwaddr memory_region_section_get_iotlb(CPUArchState *env, @@ -1774,12 +1772,12 @@ static void tcg_commit(MemoryListener *listener) static void core_log_global_start(MemoryListener *listener) { - cpu_physical_memory_set_dirty_tracking(1); + cpu_physical_memory_set_dirty_tracking(true); } static void core_log_global_stop(MemoryListener *listener) { - cpu_physical_memory_set_dirty_tracking(0); + cpu_physical_memory_set_dirty_tracking(false); } static void io_region_add(MemoryListener *listener, -- 1.7.1