qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1.1 18/24] versatile_pci: convert to memory API


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH v1.1 18/24] versatile_pci: convert to memory API
Date: Thu, 11 Aug 2011 22:53:00 +0100

On 11 August 2011 17:29, Avi Kivity <address@hidden> wrote:
> -static uint32_t pci_vpb_config_readl (void *opaque, target_phys_addr_t addr)
> +static uint64_t pci_vpb_config_read(void *opaque, target_phys_addr_t addr,
> +                                    unsigned size)
>  {
>     uint32_t val;
> -    val = pci_data_read(opaque, vpb_pci_config_addr (addr), 4);
> +    val = pci_data_read(opaque, vpb_pci_config_addr(addr), size);
>     return val;
>  }

...actually this looks a bit odd now, because the return type has
become uint64_t but val is still uint32_t (though pci_data_read()
still returns a uint32_t, so I suppose it's defensible).

I'm not sure why the local is there anyway, so I'd be tempted to
just return pci_data_read(...).

-- PMM



reply via email to

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