From patchwork Sat Dec 16 21:29:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Herv=C3=A9_Poussineau?= X-Patchwork-Id: 849561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=nongnu.org (client-ip=2001:4830:134:3::11; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=reactos.org header.i=@reactos.org header.b="LMfOflLQ"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3yzgb420Gmz9t1t for ; Sun, 17 Dec 2017 08:36:00 +1100 (AEDT) Received: from localhost ([::1]:52220 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQK7i-0001Ol-BI for incoming@patchwork.ozlabs.org; Sat, 16 Dec 2017 16:35:58 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43504) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eQK72-0001MO-WF for qemu-devel@nongnu.org; Sat, 16 Dec 2017 16:35:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eQK71-0004Th-SN for qemu-devel@nongnu.org; Sat, 16 Dec 2017 16:35:16 -0500 Received: from iserv.reactos.org ([2a01:4f8:221:4c5::3]:40070) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eQK71-0004Sm-Gi for qemu-devel@nongnu.org; Sat, 16 Dec 2017 16:35:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=reactos.org; s=25047; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=H/yGPLDPxbRf1DlFAqyN9US4ZhkviM5jRnLur89hS7c=; b=LMfOflLQWymQ5VwdgJVgoNyx/XoAvKAZqzXOFBAPg6+SpkDyun0xv9XG/4U0FOobr+jiNkgWX0j9+caPfK/1eDIuYdhlBqYx6Y+SF+2/En7nkR6XgxJ+9e2QuLFNdQsU2HTmmaLmh73FPHTJDo6oroIdJ9L6X5IiPyZJ8tk1JkE=; Received: from [2a01:e34:ee6b:9c80:6267:20ff:fe65:a488] (helo=localhost.localdomain) by iserv.reactos.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1eQK6a-0002si-4R; Sat, 16 Dec 2017 21:34:48 +0000 From: =?utf-8?q?Herv=C3=A9_Poussineau?= To: Aurelien Jarno , Yongbok Kim , "Michael S . Tsirkin" , Paolo Bonzini , qemu-devel@nongnu.org Date: Sat, 16 Dec 2017 22:29:54 +0100 Message-Id: <20171216213004.30393-6-hpoussin@reactos.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171216213004.30393-1-hpoussin@reactos.org> References: <20171216213004.30393-1-hpoussin@reactos.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:4f8:221:4c5::3 Subject: [Qemu-devel] [PATCH v2 05/15] piix4: rename some variables in realize function 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: =?utf-8?q?Herv=C3=A9_Poussineau?= Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" PIIX4 structure is now 's' PCI device is now 'pci' DeviceState is now 'dev' Signed-off-by: Hervé Poussineau --- hw/isa/piix4.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 6b8bc3faf0..4f476dc7e6 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -87,16 +87,17 @@ static const VMStateDescription vmstate_piix4 = { } }; -static void piix4_realize(PCIDevice *dev, Error **errp) +static void piix4_realize(PCIDevice *pci, Error **errp) { - PIIX4State *d = PIIX4_PCI_DEVICE(dev); + DeviceState *dev = DEVICE(pci); + PIIX4State *s = DO_UPCAST(PIIX4State, dev, pci); - if (!isa_bus_new(DEVICE(d), pci_address_space(dev), - pci_address_space_io(dev), errp)) { + if (!isa_bus_new(dev, pci_address_space(pci), + pci_address_space_io(pci), errp)) { return; } - piix4_dev = &d->dev; - qemu_register_reset(piix4_reset, d); + piix4_dev = pci; + qemu_register_reset(piix4_reset, s); } int piix4_init(PCIBus *bus, ISABus **isa_bus, int devfn)