qemu-devel
[Top][All Lists]
Advanced

[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: Andreas Färber
Subject: Re: [Qemu-devel] [PATCH 1/2] piix: use type-safe cast instead of directly access of parent dev
Date: Fri, 14 Jun 2013 11:20:55 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130510 Thunderbird/17.0.6

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.

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.

Regards,
Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

[Prev in Thread] Current Thread [Next in Thread]