From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59287) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmNrn-0008SA-Cq for qemu-devel@nongnu.org; Thu, 06 Nov 2014 09:16:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XmNrh-0007Ty-3n for qemu-devel@nongnu.org; Thu, 06 Nov 2014 09:16:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:51993) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XmNrg-0007T2-LS for qemu-devel@nongnu.org; Thu, 06 Nov 2014 09:16:45 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA6EGhfa014863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Thu, 6 Nov 2014 09:16:43 -0500 From: Igor Mammedov Date: Thu, 6 Nov 2014 14:16:13 +0000 Message-Id: <1415283373-30765-1-git-send-email-imammedo@redhat.com> In-Reply-To: <1414773522-7756-11-git-send-email-imammedo@redhat.com> References: <1414773522-7756-11-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 10/11] fixup! pc: explicitly check maxmem limit when adding DIMM List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: mst@redhat.com Fix build failure that would be caused by missing pc_dimm_count() that was introduced in dropped [03/11] pc: check if KVM has enough memory slots for DIMM devices Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 1d413a7..e656658 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1550,6 +1550,18 @@ void qemu_register_pc_machine(QEMUMachine *m) g_free(name); } +static int pc_dimm_count(Object *obj, void *opaque) +{ + int *count = opaque; + + if (object_dynamic_cast(obj, TYPE_PC_DIMM)) { + (*count)++; + } + + object_child_foreach(obj, pc_dimm_count, opaque); + return 0; +} + static int pc_existing_dimms_capacity(Object *obj, void *opaque) { Error *local_err = NULL; -- 1.8.3.1