[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 05/26] i440fx: use type-safe cast instead of
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PATCH v2 05/26] i440fx: use type-safe cast instead of directly access of parent dev |
Date: |
Sun, 07 Jul 2013 19:03:46 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7 |
Am 01.07.2013 12:18, schrieb Hu Tao:
> Signed-off-by: Hu Tao <address@hidden>
> ---
> hw/pci-host/piix.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
Thanks, converting the remaining dev uses on top and renaming.
https://github.com/afaerber/qemu-cpu/commits/qom-next
Andreas
@@ -194,7 +197,7 @@ static const VMStateDescription vmstate_i440fx = {
.load_state_old = i440fx_load_old,
.post_load = i440fx_post_load,
.fields = (VMStateField []) {
- VMSTATE_PCI_DEVICE(dev, PCII440FXState),
+ VMSTATE_PCI_DEVICE(parent_obj, PCII440FXState),
VMSTATE_UINT8(smm_enabled, PCII440FXState),
VMSTATE_END_OF_LIST()
}
@@ -221,7 +224,7 @@ static int i440fx_initfn(PCIDevice *dev)
{
PCII440FXState *d = I440FX_PCI_DEVICE(dev);
- d->dev.config[I440FX_SMRAM] = 0x02;
+ dev->config[I440FX_SMRAM] = 0x02;
cpu_smm_register(&i440fx_set_smm, d);
return 0;
@@ -308,9 +311,10 @@ static PCIBus *i440fx_common_init(const char
*device_name,
*piix3_devfn = piix3->dev.devfn;
ram_size = ram_size / 8 / 1024 / 1024;
- if (ram_size > 255)
+ if (ram_size > 255) {
ram_size = 255;
- (*pi440fx_state)->dev.config[0x57]=ram_size;
+ }
+ d->config[0x57] = ram_size;
i440fx_update_memory_mappings(f);
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] [PATCH v2 00/26] use realizefn for SysBusDevice, part 1, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 01/26] sysbus: document SysBusDeviceClass about @init, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 02/26] ohci: QOM'ify some more, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 03/26] ohci: use realize for ohci, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 05/26] i440fx: use type-safe cast instead of directly access of parent dev, Hu Tao, 2013/07/01
- Re: [Qemu-devel] [PATCH v2 05/26] i440fx: use type-safe cast instead of directly access of parent dev,
Andreas Färber <=
- [Qemu-devel] [PATCH v2 04/26] i440fx-pcihost: use realize for i440fx-pcihost, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 06/26] q35: use type-safe cast instead of directly access of parent dev, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 08/26] fdc: QOM'ify some more, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 07/26] q35: use realize for q35 host, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 11/26] pflash_cfi01: use realize for pflash_cfi01, Hu Tao, 2013/07/01
- [Qemu-devel] [PATCH v2 09/26] fdc: use realize for fdc., Hu Tao, 2013/07/01