Blame SOURCES/kvm-memory-cpu_physical_memory_set_dirty_tracking-should.patch

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