From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33368) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJgtT-000578-Qn for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:44:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XJgtN-0004da-Im for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:4043) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XJgtN-0004dU-AK for qemu-devel@nongnu.org; Tue, 19 Aug 2014 06:43:53 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s7JAhqnQ028530 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 19 Aug 2014 06:43:52 -0400 Received: from playground.com (ovpn-112-29.ams2.redhat.com [10.36.112.29]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s7JAh67S013080 for ; Tue, 19 Aug 2014 06:43:51 -0400 From: Paolo Bonzini Date: Tue, 19 Aug 2014 12:43:03 +0200 Message-Id: <1408444983-21464-21-git-send-email-pbonzini@redhat.com> In-Reply-To: <1408444983-21464-1-git-send-email-pbonzini@redhat.com> References: <1408444983-21464-1-git-send-email-pbonzini@redhat.com> Subject: [Qemu-devel] [PULL 20/20] mtree: remove write-only field List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org ml->printed is never set to true. Signed-off-by: Paolo Bonzini --- memory.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/memory.c b/memory.c index 8da29af..031ff51 100644 --- a/memory.c +++ b/memory.c @@ -1972,7 +1972,6 @@ typedef struct MemoryRegionList MemoryRegionList; struct MemoryRegionList { const MemoryRegion *mr; - bool printed; QTAILQ_ENTRY(MemoryRegionList) queue; }; @@ -2002,7 +2001,7 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f, /* check if the alias is already in the queue */ QTAILQ_FOREACH(ml, alias_print_queue, queue) { - if (ml->mr == mr->alias && !ml->printed) { + if (ml->mr == mr->alias) { found = true; } } @@ -2010,7 +2009,6 @@ static void mtree_print_mr(fprintf_function mon_printf, void *f, if (!found) { ml = g_new(MemoryRegionList, 1); ml->mr = mr->alias; - ml->printed = false; QTAILQ_INSERT_TAIL(alias_print_queue, ml, queue); } mon_printf(f, TARGET_FMT_plx "-" TARGET_FMT_plx @@ -2092,10 +2090,8 @@ void mtree_info(fprintf_function mon_printf, void *f) mon_printf(f, "aliases\n"); /* print aliased regions */ QTAILQ_FOREACH(ml, &ml_head, queue) { - if (!ml->printed) { - mon_printf(f, "%s\n", memory_region_name(ml->mr)); - mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head); - } + mon_printf(f, "%s\n", memory_region_name(ml->mr)); + mtree_print_mr(mon_printf, f, ml->mr, 0, 0, &ml_head); } QTAILQ_FOREACH_SAFE(ml, &ml_head, queue, ml2) { -- 1.8.3.1