From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45460) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtFhM-00008f-6a for qemu-devel@nongnu.org; Wed, 18 Dec 2013 06:54:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VtFhG-0000eg-7s for qemu-devel@nongnu.org; Wed, 18 Dec 2013 06:53:56 -0500 Received: from mx1.redhat.com ([209.132.183.28]:1939) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VtFhF-0000eT-VL for qemu-devel@nongnu.org; Wed, 18 Dec 2013 06:53:50 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rBIBrmhf019132 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 18 Dec 2013 06:53:49 -0500 Message-ID: <52B18CEA.9030202@redhat.com> Date: Wed, 18 Dec 2013 13:54:18 +0200 From: Orit Wasserman MIME-Version: 1.0 References: <1387293974-24718-1-git-send-email-quintela@redhat.com> <1387293974-24718-30-git-send-email-quintela@redhat.com> In-Reply-To: <1387293974-24718-30-git-send-email-quintela@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 29/38] memory: cpu_physical_memory_set_dirty_tracking() should return void List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela , qemu-devel@nongnu.org On 12/17/2013 05:26 PM, Juan Quintela wrote: > 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 > --- > exec.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) > > diff --git a/exec.c b/exec.c > index ba5989c..d165fd8 100644 > --- a/exec.c > +++ b/exec.c > @@ -56,7 +56,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) }; > > @@ -751,11 +751,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, > @@ -1797,12 +1795,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 MemoryListener core_memory_listener = { > Reviewed-by: Orit Wasserman