From patchwork Wed Oct 7 14:56:19 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 35296 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 45E45B7B7C for ; Thu, 8 Oct 2009 02:06:15 +1100 (EST) Received: from localhost ([127.0.0.1]:47537 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvY5k-0002xu-Iy for incoming@patchwork.ozlabs.org; Wed, 07 Oct 2009 11:06:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MvXwn-0002sg-UZ for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:56:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MvXwj-0002ml-4p for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:56:57 -0400 Received: from [199.232.76.173] (port=55156 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MvXwi-0002mb-VV for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:56:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38983) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MvXwi-0003eP-GI for qemu-devel@nongnu.org; Wed, 07 Oct 2009 10:56:52 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n97EupNf023521 for ; Wed, 7 Oct 2009 10:56:51 -0400 Received: from localhost.localdomain (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx08.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id n97Eulno016943; Wed, 7 Oct 2009 10:56:50 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 7 Oct 2009 16:56:19 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.67 on 10.5.11.21 X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Qemu-devel] [PATCH 02/12] ide: Remove cast in pci_register_bar X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org We already have a PCIDevice at that point Signed-off-by: Juan Quintela --- hw/ide/pci.c | 18 ++++++------------ 1 files changed, 6 insertions(+), 12 deletions(-) diff --git a/hw/ide/pci.c b/hw/ide/pci.c index 0e2c7d7..9d7fdd4 100644 --- a/hw/ide/pci.c +++ b/hw/ide/pci.c @@ -413,16 +413,11 @@ static int pci_cmd646_ide_initfn(PCIDevice *dev) pci_conf[0x51] |= 0x08; /* enable IDE1 */ } - pci_register_bar((PCIDevice *)d, 0, 0x8, - PCI_ADDRESS_SPACE_IO, ide_map); - pci_register_bar((PCIDevice *)d, 1, 0x4, - PCI_ADDRESS_SPACE_IO, ide_map); - pci_register_bar((PCIDevice *)d, 2, 0x8, - PCI_ADDRESS_SPACE_IO, ide_map); - pci_register_bar((PCIDevice *)d, 3, 0x4, - PCI_ADDRESS_SPACE_IO, ide_map); - pci_register_bar((PCIDevice *)d, 4, 0x10, - PCI_ADDRESS_SPACE_IO, bmdma_map); + pci_register_bar(dev, 0, 0x8, PCI_ADDRESS_SPACE_IO, ide_map); + pci_register_bar(dev, 1, 0x4, PCI_ADDRESS_SPACE_IO, ide_map); + pci_register_bar(dev, 2, 0x8, PCI_ADDRESS_SPACE_IO, ide_map); + pci_register_bar(dev, 3, 0x4, PCI_ADDRESS_SPACE_IO, ide_map); + pci_register_bar(dev, 4, 0x10, PCI_ADDRESS_SPACE_IO, bmdma_map); pci_conf[0x3d] = 0x01; // interrupt on pin 1 @@ -477,8 +472,7 @@ static int pci_piix_ide_initfn(PCIIDEState *d) qemu_register_reset(piix3_reset, d); piix3_reset(d); - pci_register_bar((PCIDevice *)d, 4, 0x10, - PCI_ADDRESS_SPACE_IO, bmdma_map); + pci_register_bar(&d->dev, 4, 0x10, PCI_ADDRESS_SPACE_IO, bmdma_map); register_savevm("ide", 0, 3, pci_ide_save, pci_ide_load, d);