[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/2] piix: use type-safe cast instead of directl
From: |
Hu Tao |
Subject: |
Re: [Qemu-devel] [PATCH 1/2] piix: use type-safe cast instead of directly access of parent dev |
Date: |
Mon, 17 Jun 2013 09:56:47 +0800 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Fri, Jun 14, 2013 at 11:20:55AM +0200, Andreas Färber wrote:
> Hi,
>
> Am 14.06.2013 08:49, schrieb Hu Tao:
> > Signed-off-by: Hu Tao <address@hidden>
> > ---
> > hw/pci-host/piix.c | 11 +++++++----
> > 1 file changed, 7 insertions(+), 4 deletions(-)
> >
> > diff --git a/hw/pci-host/piix.c b/hw/pci-host/piix.c
> > index f9e68c3..ba9a8f0 100644
> > --- a/hw/pci-host/piix.c
> > +++ b/hw/pci-host/piix.c
> > @@ -121,22 +121,24 @@ static int pci_slot_get_pirq(PCIDevice *pci_dev, int
> > pci_intx)
> > static void i440fx_update_memory_mappings(PCII440FXState *d)
> > {
> > int i;
> > + PCIDevice *pd = PCI_DEVICE(d);
> >
> > memory_region_transaction_begin();
> > for (i = 0; i < 13; i++) {
> > pam_update(&d->pam_regions[i], i,
> > - d->dev.config[I440FX_PAM + ((i + 1) / 2)]);
> > + pd->config[I440FX_PAM + ((i + 1) / 2)]);
> [snip]
>
> These two patches will likely conflict with Peter C.'s recent PCI
> patchset doing the same thing.
Thanks for reminding! I applied these two on top of Peter's patchset,
only patch 2 conflicts on one hunk.
>
> They look okay, although in one case changing to "dev" variable will
> force yet another change when later switching to QOM realize with
> DeviceState *dev.
Do you mean q35_host_init(SysBusDevice *dev)? Would you like to hold it?