From: Aurelien Jarno <aurelien@aurel32.net>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: Huacai Chen <zltjiangshi@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] mips64el: fulong: PCI_DEVFN() clean up.
Date: Fri, 30 Jul 2010 23:23:22 +0200 [thread overview]
Message-ID: <20100730212322.GF20459@volta.aurel32.net> (raw)
In-Reply-To: <20100727062447.GC5690@valinux.co.jp>
On Tue, Jul 27, 2010 at 03:24:47PM +0900, Isaku Yamahata wrote:
> Use PCI_DEVFN() where appropriate.
> The resulted stripped binary remains same
> with/without thie patch.
>
> Cc: Huacai Chen <zltjiangshi@gmail.com>
> Cc: Aurelien Jarno <aurelien@aurel32.net>
> Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> ---
> hw/mips_fulong2e.c | 14 +++++++-------
> 1 files changed, 7 insertions(+), 7 deletions(-)
Thanks, applied.
> diff --git a/hw/mips_fulong2e.c b/hw/mips_fulong2e.c
> index a9bbff6..c6c13ca 100644
> --- a/hw/mips_fulong2e.c
> +++ b/hw/mips_fulong2e.c
> @@ -219,8 +219,8 @@ uint8_t eeprom_spd[0x80] = {
> #ifdef HAS_AUDIO
> static void audio_init (PCIBus *pci_bus)
> {
> - vt82c686b_ac97_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 5);
> - vt82c686b_mc97_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 6);
> + vt82c686b_ac97_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 5));
> + vt82c686b_mc97_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 6));
> }
> #endif
>
> @@ -349,18 +349,18 @@ static void mips_fulong2e_init(ram_addr_t ram_size, const char *boot_device,
> hd[i] = drive_get(IF_IDE, i / MAX_IDE_DEVS, i % MAX_IDE_DEVS);
> }
>
> - via_devfn = vt82c686b_init(pci_bus, FULONG2E_VIA_SLOT << 3);
> + via_devfn = vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 0));
> if (via_devfn < 0) {
> fprintf(stderr, "vt82c686b_init error \n");
> exit(1);
> }
>
> isa_bus_irqs(i8259);
> - vt82c686b_ide_init(pci_bus, hd, (FULONG2E_VIA_SLOT << 3) + 1);
> - usb_uhci_vt82c686b_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 2);
> - usb_uhci_vt82c686b_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 3);
> + vt82c686b_ide_init(pci_bus, hd, PCI_DEVFN(FULONG2E_VIA_SLOT, 1));
> + usb_uhci_vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 2));
> + usb_uhci_vt82c686b_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 3));
>
> - smbus = vt82c686b_pm_init(pci_bus, (FULONG2E_VIA_SLOT << 3) + 4,
> + smbus = vt82c686b_pm_init(pci_bus, PCI_DEVFN(FULONG2E_VIA_SLOT, 4),
> 0xeee1, NULL);
> eeprom_buf = qemu_mallocz(8 * 256); /* XXX: make this persistent */
> memcpy(eeprom_buf, eeprom_spd, sizeof(eeprom_spd));
> --
> 1.7.1.1
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2010-07-30 21:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-27 6:24 [Qemu-devel] [PATCH] mips64el: fulong: PCI_DEVFN() clean up Isaku Yamahata
2010-07-30 21:23 ` Aurelien Jarno [this message]
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=20100730212322.GF20459@volta.aurel32.net \
--to=aurelien@aurel32.net \
--cc=qemu-devel@nongnu.org \
--cc=yamahata@valinux.co.jp \
--cc=zltjiangshi@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.