From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32837) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJMpb-0005b0-9o for qemu-devel@nongnu.org; Fri, 28 Feb 2014 07:46:32 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WJMpR-0002xp-4c for qemu-devel@nongnu.org; Fri, 28 Feb 2014 07:46:23 -0500 Received: from e28smtp08.in.ibm.com ([122.248.162.8]:55382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WJMpQ-0002xc-GQ for qemu-devel@nongnu.org; Fri, 28 Feb 2014 07:46:13 -0500 Received: from /spool/local by e28smtp08.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 28 Feb 2014 18:16:11 +0530 From: Mark Wu Date: Fri, 28 Feb 2014 20:45:40 +0800 Message-Id: <1393591540-32435-2-git-send-email-wudxw@linux.vnet.ibm.com> In-Reply-To: <1393591540-32435-1-git-send-email-wudxw@linux.vnet.ibm.com> References: <1393591540-32435-1-git-send-email-wudxw@linux.vnet.ibm.com> Subject: [Qemu-devel] [PATCH 2/2] Fix return value of vga initlization on ppc List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, qemu-ppc@nongnu.org Cc: Mark Wu , nikunj@linux.vnet.ibm.com, Alexander Graf , Anthony Liguori Before spapr_vga_init will returned false if the vga is specified by the command '-device VGA' because vga_interface_type was evaluated to VGA_NONE. With the change in previous patch of this series, spapr_vga_init should return true if it's told that the vga will be initialized in flow of the generic devices initialization. This patch also makes two cleanups: 1. skip initialization for VGA_NONE 2. remove the useless 'break' Signed-off-by: Mark Wu --- hw/ppc/spapr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 93d02c1..4d0ac56 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -765,13 +765,15 @@ static int spapr_vga_init(PCIBus *pci_bus) { switch (vga_interface_type) { case VGA_NONE: + return false; + case VGA_DEVICE: + return true; case VGA_STD: return pci_vga_init(pci_bus) != NULL; default: fprintf(stderr, "This vga model is not supported," "currently it only supports -vga std\n"); exit(0); - break; } } -- 1.8.4.2