From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 970DBCDB482 for ; Sat, 14 Oct 2023 15:10:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrgHH-00077M-VG; Sat, 14 Oct 2023 11:10:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrgHE-00076n-2c for qemu-devel@nongnu.org; Sat, 14 Oct 2023 11:10:04 -0400 Received: from hsmtpd-def.xspmail.jp ([202.238.198.240]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrgHA-0001Yn-NT for qemu-devel@nongnu.org; Sat, 14 Oct 2023 11:10:02 -0400 X-Country-Code: JP Received: from sakura.ysato.name (ik1-413-38519.vs.sakura.ne.jp [153.127.30.23]) by hsmtpd-out-2.asahinet.cluster.xspmail.jp (Halon) with ESMTPA id 8409b21d-86ba-4c55-8cb5-ab4b8ec3ec2e; Sun, 15 Oct 2023 00:09:57 +0900 (JST) Received: from SIOS1075.ysato.ml (ZM005235.ppp.dion.ne.jp [222.8.5.235]) by sakura.ysato.name (Postfix) with ESMTPSA id 2F60A1C0037; Sun, 15 Oct 2023 00:09:57 +0900 (JST) Date: Sun, 15 Oct 2023 00:09:56 +0900 Message-ID: <87a5sl8cl7.wl-ysato@users.sourceforge.jp> From: Yoshinori Sato To: Philippe =?ISO-8859-1?Q?Mathieu-Daud=E9?= Cc: qemu-devel@nongnu.org, Magnus Damm , qemu-trivial@nongnu.org Subject: Re: [PATCH 2/3] hw/pci-host/sh_pcic: Correct PCI host / devfn#0 function names In-Reply-To: <20231012041237.22281-3-philmd@linaro.org> References: <20231012041237.22281-1-philmd@linaro.org> <20231012041237.22281-3-philmd@linaro.org> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.7 (Harue) FLIM-LB/1.14.9 (=?ISO-8859-4?Q?Goj=F2?=) APEL-LB/10.8 EasyPG/1.0.0 Emacs/28.2 (x86_64-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received-SPF: softfail client-ip=202.238.198.240; envelope-from=ysato@users.sourceforge.jp; helo=hsmtpd-def.xspmail.jp X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Thu, 12 Oct 2023 13:12:36 +0900, Philippe Mathieu-Daud=E9 wrote: >=20 > Host bridge device and PCI function #0 are inverted. >=20 > Signed-off-by: Philippe Mathieu-Daud=E9 Reviewed-by: Yoshinori Sato > --- > hw/pci-host/sh_pci.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) >=20 > diff --git a/hw/pci-host/sh_pci.c b/hw/pci-host/sh_pci.c > index 41aed48c85..580e273d96 100644 > --- a/hw/pci-host/sh_pci.c > +++ b/hw/pci-host/sh_pci.c > @@ -116,7 +116,7 @@ static void sh_pci_set_irq(void *opaque, int irq_num,= int level) > qemu_set_irq(pic[irq_num], level); > } > =20 > -static void sh_pci_device_realize(DeviceState *dev, Error **errp) > +static void sh_pcic_host_realize(DeviceState *dev, Error **errp) > { > SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); > SHPCIState *s =3D SH_PCI_HOST_BRIDGE(dev); > @@ -145,19 +145,19 @@ static void sh_pci_device_realize(DeviceState *dev,= Error **errp) > s->dev =3D pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "sh_pci_host= "); > } > =20 > -static void sh_pci_host_realize(PCIDevice *d, Error **errp) > +static void sh_pcic_pci_realize(PCIDevice *d, Error **errp) > { > pci_set_word(d->config + PCI_COMMAND, PCI_COMMAND_WAIT); > pci_set_word(d->config + PCI_STATUS, PCI_STATUS_CAP_LIST | > PCI_STATUS_FAST_BACK | PCI_STATUS_DEVSEL_MEDIUM); > } > =20 > -static void sh_pci_host_class_init(ObjectClass *klass, void *data) > +static void sh_pcic_pci_class_init(ObjectClass *klass, void *data) > { > PCIDeviceClass *k =3D PCI_DEVICE_CLASS(klass); > DeviceClass *dc =3D DEVICE_CLASS(klass); > =20 > - k->realize =3D sh_pci_host_realize; > + k->realize =3D sh_pcic_pci_realize; > k->vendor_id =3D PCI_VENDOR_ID_HITACHI; > k->device_id =3D PCI_DEVICE_ID_HITACHI_SH7751R; > /* > @@ -167,11 +167,11 @@ static void sh_pci_host_class_init(ObjectClass *kla= ss, void *data) > dc->user_creatable =3D false; > } > =20 > -static void sh_pci_device_class_init(ObjectClass *klass, void *data) > +static void sh_pcic_host_class_init(ObjectClass *klass, void *data) > { > DeviceClass *dc =3D DEVICE_CLASS(klass); > =20 > - dc->realize =3D sh_pci_device_realize; > + dc->realize =3D sh_pcic_host_realize; > } > =20 > static const TypeInfo sh_pcic_types[] =3D { > @@ -179,12 +179,12 @@ static const TypeInfo sh_pcic_types[] =3D { > .name =3D TYPE_SH_PCI_HOST_BRIDGE, > .parent =3D TYPE_PCI_HOST_BRIDGE, > .instance_size =3D sizeof(SHPCIState), > - .class_init =3D sh_pci_device_class_init, > + .class_init =3D sh_pcic_host_class_init, > }, { > .name =3D "sh_pci_host", > .parent =3D TYPE_PCI_DEVICE, > .instance_size =3D sizeof(PCIDevice), > - .class_init =3D sh_pci_host_class_init, > + .class_init =3D sh_pcic_pci_class_init, > .interfaces =3D (InterfaceInfo[]) { > { INTERFACE_CONVENTIONAL_PCI_DEVICE }, > { }, > --=20 > 2.41.0 >=20