[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-commits] [COMMIT f3566bf] cirrus_vga: Change casts to DO_UPCAS
From: |
Rick Vernam |
Subject: |
Re: [Qemu-commits] [COMMIT f3566bf] cirrus_vga: Change casts to DO_UPCAST() forPCICirrusVGAState |
Date: |
Fri, 28 Aug 2009 10:05:20 -0500 |
User-agent: |
KMail/1.12.0 (Linux/2.6.30-gentoo-r4; KDE/4.3.0; x86_64; ; ) |
I apologize for my apparent ignorance.
I am curious how one ascertains from a commit message such as this where the
patch was applied? ie, only to the 0.12 branch...or?
In particular, I will be sticking with the 0.11 branch until I get hardware
with virtualization support. How can I tell which commits are applied to that
branch?
If that information is available on a website somewhere, I would also like to
apologize for having not looked. With all the flux, I've kind of given up on
trying to keep track of an authoritative source...
Thanks,
Rick
On Thursday 27 August 2009 9:20:11 pm Anthony Liguori wrote:
> From: Juan Quintela <address@hidden>
>
> Signed-off-by: Juan Quintela <address@hidden>
> Signed-off-by: Anthony Liguori <address@hidden>
>
> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
> index 167401d..cefa7d2 100644
> --- a/hw/cirrus_vga.c
> +++ b/hw/cirrus_vga.c
> @@ -3263,7 +3263,7 @@ void isa_cirrus_vga_init(void)
> static void cirrus_pci_lfb_map(PCIDevice *d, int region_num,
> uint32_t addr, uint32_t size, int type)
> {
> - CirrusVGAState *s = &((PCICirrusVGAState *)d)->cirrus_vga;
> + CirrusVGAState *s = &DO_UPCAST(PCICirrusVGAState, dev, d)->cirrus_vga;
>
> /* XXX: add byte swapping apertures */
> cpu_register_physical_memory(addr, s->vga.vram_size,
> @@ -3284,7 +3284,7 @@ static void cirrus_pci_lfb_map(PCIDevice *d, int
> region_num, static void cirrus_pci_mmio_map(PCIDevice *d, int region_num,
> uint32_t addr, uint32_t size, int type)
> {
> - CirrusVGAState *s = &((PCICirrusVGAState *)d)->cirrus_vga;
> + CirrusVGAState *s = &DO_UPCAST(PCICirrusVGAState, dev, d)->cirrus_vga;
>
> cpu_register_physical_memory(addr, CIRRUS_PNPMMIO_SIZE,
> s->cirrus_mmio_io_addr);
> @@ -3293,11 +3293,11 @@ static void cirrus_pci_mmio_map(PCIDevice *d, int
> region_num, static void pci_cirrus_write_config(PCIDevice *d,
> uint32_t address, uint32_t val, int
> len) {
> - PCICirrusVGAState *pvs = container_of(d, PCICirrusVGAState, dev);
> + PCICirrusVGAState *pvs = DO_UPCAST(PCICirrusVGAState, dev, d);
> CirrusVGAState *s = &pvs->cirrus_vga;
>
> pci_default_write_config(d, address, val, len);
> - if (s->vga.map_addr && pvs->dev.io_regions[0].addr == -1)
> + if (s->vga.map_addr && d->io_regions[0].addr == -1)
> s->vga.map_addr = 0;
> cirrus_update_memory_access(s);
> }
> @@ -3312,7 +3312,7 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
> /* setup VGA */
> vga_common_init(&s->vga, VGA_RAM_SIZE);
> cirrus_init_common(s, device_id, 1);
> - s->vga.pci_dev = (PCIDevice *)d;
> + s->vga.pci_dev = dev;
> s->vga.ds = graphic_console_init(s->vga.update, s->vga.invalidate,
> s->vga.screen_dump,
> s->vga.text_update, &s->vga);