From nobody Fri Nov 7 17:09:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1548454148724292.33363548532645; Fri, 25 Jan 2019 14:09:08 -0800 (PST) Received: from localhost ([127.0.0.1]:51336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn9er-0006VD-MA for importer@patchew.org; Fri, 25 Jan 2019 17:09:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gn9cp-0005He-Pj for qemu-devel@nongnu.org; Fri, 25 Jan 2019 17:07:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gn9co-0006eu-Cb for qemu-devel@nongnu.org; Fri, 25 Jan 2019 17:06:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44532) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gn9co-0006bj-0W for qemu-devel@nongnu.org; Fri, 25 Jan 2019 17:06:58 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30A6B1064; Fri, 25 Jan 2019 22:06:56 +0000 (UTC) Received: from probe.bos.redhat.com (dhcp-17-168.bos.redhat.com [10.18.17.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EBDD61520; Fri, 25 Jan 2019 22:06:55 +0000 (UTC) From: John Snow To: qemu-devel@nongnu.org Date: Fri, 25 Jan 2019 17:06:47 -0500 Message-Id: <20190125220648.28164-8-jsnow@redhat.com> In-Reply-To: <20190125220648.28164-1-jsnow@redhat.com> References: <20190125220648.28164-1-jsnow@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Fri, 25 Jan 2019 22:06:56 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PULL 7/8] ide/via: Rename functions to match device name X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, jsnow@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: BALATON Zoltan The device is called via-ide and the modelled IDE controller is not specific to 82C686B but is also usable independently. Therefore, change function name prefixes accordingly to match device name. Signed-off-by: BALATON Zoltan Message-id: 2905ced862c8d2ad509d73152171ce2472d72605.1548160772.git.balaton= @eik.bme.hu Signed-off-by: John Snow --- hw/ide/via.c | 15 +++++++-------- hw/mips/mips_fulong2e.c | 2 +- include/hw/ide.h | 2 +- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/hw/ide/via.c b/hw/ide/via.c index 46cac7b8d6..c6e43a8812 100644 --- a/hw/ide/via.c +++ b/hw/ide/via.c @@ -110,7 +110,7 @@ static void bmdma_setup_bar(PCIIDEState *d) } } =20 -static void via_reset(void *opaque) +static void via_ide_reset(void *opaque) { PCIIDEState *d =3D opaque; PCIDevice *pd =3D PCI_DEVICE(d); @@ -152,8 +152,7 @@ static void via_reset(void *opaque) pci_set_long(pci_conf + 0xc0, 0x00020001); } =20 -/* via ide func */ -static void vt82c686b_ide_realize(PCIDevice *dev, Error **errp) +static void via_ide_realize(PCIDevice *dev, Error **errp) { PCIIDEState *d =3D PCI_IDE(dev); uint8_t *pci_conf =3D dev->config; @@ -162,7 +161,7 @@ static void vt82c686b_ide_realize(PCIDevice *dev, Error= **errp) pci_config_set_prog_interface(pci_conf, 0x8a); /* legacy ATA mode */ pci_set_long(pci_conf + PCI_CAPABILITY_LIST, 0x000000c0); =20 - qemu_register_reset(via_reset, d); + qemu_register_reset(via_ide_reset, d); bmdma_setup_bar(d); pci_register_bar(dev, 4, PCI_BASE_ADDRESS_SPACE_IO, &d->bmdma_bar); =20 @@ -180,7 +179,7 @@ static void vt82c686b_ide_realize(PCIDevice *dev, Error= **errp) } } =20 -static void vt82c686b_ide_exitfn(PCIDevice *dev) +static void via_ide_exitfn(PCIDevice *dev) { PCIIDEState *d =3D PCI_IDE(dev); unsigned i; @@ -191,7 +190,7 @@ static void vt82c686b_ide_exitfn(PCIDevice *dev) } } =20 -void vt82c686b_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) +void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn) { PCIDevice *dev; =20 @@ -204,8 +203,8 @@ static void via_ide_class_init(ObjectClass *klass, void= *data) DeviceClass *dc =3D DEVICE_CLASS(klass); PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); =20 - k->realize =3D vt82c686b_ide_realize; - k->exit =3D vt82c686b_ide_exitfn; + k->realize =3D via_ide_realize; + k->exit =3D via_ide_exitfn; k->vendor_id =3D PCI_VENDOR_ID_VIA; k->device_id =3D PCI_DEVICE_ID_VIA_IDE; k->revision =3D 0x06; diff --git a/hw/mips/mips_fulong2e.c b/hw/mips/mips_fulong2e.c index 2fbba32c48..42d09f6892 100644 --- a/hw/mips/mips_fulong2e.c +++ b/hw/mips/mips_fulong2e.c @@ -249,7 +249,7 @@ static void vt82c686b_southbridge_init(PCIBus *pci_bus,= int slot, qemu_irq intc, isa_create_simple(isa_bus, TYPE_VT82C686B_SUPERIO); =20 ide_drive_get(hd, ARRAY_SIZE(hd)); - vt82c686b_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1)); + via_ide_init(pci_bus, hd, PCI_DEVFN(slot, 1)); =20 pci_create_simple(pci_bus, PCI_DEVFN(slot, 2), "vt82c686b-usb-uhci"); pci_create_simple(pci_bus, PCI_DEVFN(slot, 3), "vt82c686b-usb-uhci"); diff --git a/include/hw/ide.h b/include/hw/ide.h index 3ae087c572..28d8a06439 100644 --- a/include/hw/ide.h +++ b/include/hw/ide.h @@ -18,7 +18,7 @@ PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo = **hd_table, int devfn); PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn= ); int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux); -void vt82c686b_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); +void via_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn); =20 /* ide-mmio.c */ void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1= ); --=20 2.17.2