From: Wanpeng Li <liwp.linux@gmail.com>
To: Anthony Liguori <aliguori@us.ibm.com>
Cc: Wanpeng Li <liwp.linux@gmail.com>, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] cleanup pc_vga_init function
Date: Wed, 4 Jul 2012 16:56:43 +0800 [thread overview]
Message-ID: <1341392203-15766-1-git-send-email-liwp.linux@gmail.com> (raw)
From: Wanpeng Li <liwp@linux.vnet.ibm.com>
Since function pc_vga_init doesn't need to return DeviceState any more,
just cleanup.
Signed-off-by: Wanpneg Li <liwp.linux@gmail.com>
---
hw/pc.c | 18 +++++++-----------
hw/pc.h | 2 +-
2 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/hw/pc.c b/hw/pc.c
index c7e9ab3..f387448 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -1037,39 +1037,35 @@ qemu_irq *pc_allocate_cpu_irq(void)
return qemu_allocate_irqs(pic_irq_request, NULL, 1);
}
-DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
+void pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus)
{
- DeviceState *dev = NULL;
-
if (cirrus_vga_enabled) {
if (pci_bus) {
- dev = pci_cirrus_vga_init(pci_bus);
+ pci_cirrus_vga_init(pci_bus);
} else {
- dev = &isa_create_simple(isa_bus, "isa-cirrus-vga")->qdev;
+ isa_create_simple(isa_bus, "isa-cirrus-vga");
}
} else if (vmsvga_enabled) {
if (pci_bus) {
- dev = pci_vmsvga_init(pci_bus);
+ pci_vmsvga_init(pci_bus);
} else {
fprintf(stderr, "%s: vmware_vga: no PCI bus\n", __FUNCTION__);
}
#ifdef CONFIG_SPICE
} else if (qxl_enabled) {
if (pci_bus) {
- dev = &pci_create_simple(pci_bus, -1, "qxl-vga")->qdev;
+ pci_create_simple(pci_bus, -1, "qxl-vga");
} else {
fprintf(stderr, "%s: qxl: no PCI bus\n", __FUNCTION__);
}
#endif
} else if (std_vga_enabled) {
if (pci_bus) {
- dev = pci_vga_init(pci_bus);
+ pci_vga_init(pci_bus);
} else {
- dev = isa_vga_init(isa_bus);
+ isa_vga_init(isa_bus);
}
}
-
- return dev;
}
static void cpu_request_exit(void *opaque, int irq, int level)
diff --git a/hw/pc.h b/hw/pc.h
index 31ccb6f..616864e 100644
--- a/hw/pc.h
+++ b/hw/pc.h
@@ -115,7 +115,7 @@ void *pc_memory_init(MemoryRegion *system_memory,
MemoryRegion *rom_memory,
MemoryRegion **ram_memory);
qemu_irq *pc_allocate_cpu_irq(void);
-DeviceState *pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
+void pc_vga_init(ISABus *isa_bus, PCIBus *pci_bus);
void pc_basic_device_init(ISABus *isa_bus, qemu_irq *gsi,
ISADevice **rtc_state,
ISADevice **floppy,
--
1.7.5.4
reply other threads:[~2012-07-04 8:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1341392203-15766-1-git-send-email-liwp.linux@gmail.com \
--to=liwp.linux@gmail.com \
--cc=aliguori@us.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.