From: Stefan Weil <weil@mail.berlios.de>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST()
Date: Mon, 24 Aug 2009 14:59:47 +0200 [thread overview]
Message-ID: <4A928EC3.3060700@mail.berlios.de> (raw)
In-Reply-To: <23ebd22d4503824120a6fda0544518fae4a7f7b6.1251111439.git.quintela@redhat.com>
Juan Quintela schrieb:
> Signed-off-by: Juan Quintela <quintela@redhat.com>
> ---
> hw/eepro100.c | 10 +++++-----
> 1 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/hw/eepro100.c b/hw/eepro100.c
> index ec31a6a..0031d36 100644
> --- a/hw/eepro100.c
> +++ b/hw/eepro100.c
> @@ -1,4 +1,4 @@
> -/*
> + /*
> * QEMU i8255x (PRO100) emulation
> *
> * Copyright (c) 2006-2007 Stefan Weil
>
Please don't change formatting of multiline comments like this.
> @@ -1346,7 +1346,7 @@ typedef struct PCIEEPRO100State {
> static void pci_map(PCIDevice * pci_dev, int region_num,
> uint32_t addr, uint32_t size, int type)
> {
> - PCIEEPRO100State *d = (PCIEEPRO100State *) pci_dev;
> + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
> EEPRO100State *s = &d->eepro100;
>
> logout("region %d, addr=0x%08x, size=0x%08x, type=%d\n",
> @@ -1420,7 +1420,7 @@ static CPUReadMemoryFunc *pci_mmio_read[] = {
> static void pci_mmio_map(PCIDevice * pci_dev, int region_num,
> uint32_t addr, uint32_t size, int type)
> {
> - PCIEEPRO100State *d = (PCIEEPRO100State *) pci_dev;
> + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
>
> logout("region %d, addr=0x%08x, size=0x%08x, type=%d\n",
> region_num, addr, size, type);
> @@ -1720,7 +1720,7 @@ static void nic_cleanup(VLANClientState *vc)
>
> static int pci_nic_uninit(PCIDevice *dev)
> {
> - PCIEEPRO100State *d = (PCIEEPRO100State *) dev;
> + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, dev);
> EEPRO100State *s = &d->eepro100;
>
> cpu_unregister_io_memory(s->mmio_index);
> @@ -1730,7 +1730,7 @@ static int pci_nic_uninit(PCIDevice *dev)
>
> static void nic_init(PCIDevice *pci_dev, uint32_t device)
> {
> - PCIEEPRO100State *d = (PCIEEPRO100State *)pci_dev;
> + PCIEEPRO100State *d = DO_UPCAST(PCIEEPRO100State, dev, pci_dev);
> EEPRO100State *s;
>
> logout("\n");
>
next prev parent reply other threads:[~2009-08-24 13:00 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-24 11:03 [Qemu-devel] [PATCH 00/22] Indirection Cleanup Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 01/22] eepro100: convert casts to DO_UPCAST() Juan Quintela
2009-08-24 12:59 ` Stefan Weil [this message]
2009-08-24 12:59 ` [Qemu-devel] " Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense Juan Quintela
2009-08-24 12:56 ` Stefan Weil
2009-08-24 13:04 ` [Qemu-devel] " Juan Quintela
2009-08-24 13:51 ` Anthony Liguori
2009-08-24 13:51 ` [Qemu-devel] " Markus Armbruster
2009-08-26 13:52 ` [Qemu-devel] Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense) Stefan Weil
2009-08-26 14:49 ` Gerd Hoffmann
2009-08-26 17:04 ` Jamie Lokier
2009-08-26 18:37 ` malc
2009-08-26 19:03 ` Jamie Lokier
2009-08-26 19:26 ` malc
2009-08-26 21:00 ` Jamie Lokier
2009-08-26 15:01 ` [Qemu-devel] Coding style, C++ compatible code Markus Armbruster
2009-08-26 15:19 ` Anthony Liguori
2009-08-26 15:20 ` Coding style, C++ compatible code (was Re: [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense) Måns Rullgård
2009-08-26 15:58 ` Reimar Döffinger
2009-08-26 16:08 ` Avi Kivity
2009-09-03 12:05 ` Stuart Brady
2009-08-26 15:54 ` [Qemu-devel] " Avi Kivity
2009-08-26 17:36 ` Jamie Lokier
2009-08-24 14:05 ` [Qemu-devel] [PATCH 02/22] eepro100: cast a void * makes no sense Gerd Hoffmann
2009-08-24 11:03 ` [Qemu-devel] [PATCH 03/22] eepro100: Remove unused indirection of PCIDevice Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 04/22] es1370: Remove unused indirection of PCIES1370State and ES1370State Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 05/22] ne2000: remove casts from void * Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 06/22] ne2000: pci_dev has this very value with the right type Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 07/22] ne2000: Remove unneeded double indirection of PCINE2000State Juan Quintela
2009-08-24 12:40 ` Gerd Hoffmann
2009-08-24 12:51 ` [Qemu-devel] " Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 08/22] ne2000: change pci_dev to is_pci Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 09/22] pci: remove casts from void * Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 10/22] rtl8139: Remove unneeded double indirection of PCIRTL8139State Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 11/22] rtl8139: remove pointless cast from void * Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 12/22] lsi53c895a: " Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 13/22] lsi53c895a: use DO_UPCAST to cast from PCIDevice Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 14/22] lsi53c895a: rename PCIDevice field from pci_dev to dev (consistence) Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 15/22] lsi53c895a: LSIState is a PCIDevice is a DeviceHost Juan Quintela
2009-08-24 12:44 ` Gerd Hoffmann
2009-08-24 11:03 ` [Qemu-devel] [PATCH 16/22] usb-ohci: Remove unneeded double indirection of OHCIPCIState Juan Quintela
2009-08-24 12:46 ` Gerd Hoffmann
2009-08-24 11:03 ` [Qemu-devel] [PATCH 17/22] cirrus_vga: Remove unneeded double indirection of PCICirrusVGAState Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 18/22] cirrus_vga: remove pointless cast from void * Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 19/22] cirrus_vga: change use of pci_dev for is_pci Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 20/22] Introduce vga_common_reset() to be able to typcheck vga_reset() Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 21/22] vga: Rename vga_state -> vga Juan Quintela
2009-08-24 11:03 ` [Qemu-devel] [PATCH 22/22] Everything outside of vga.c should use VGACommonState Juan Quintela
2009-08-24 12:37 ` [Qemu-devel] [PATCH 00/22] Indirection Cleanup Gerd Hoffmann
2009-08-24 12:56 ` [Qemu-devel] " Juan Quintela
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A928EC3.3060700@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).