From nobody Wed Nov 5 23:44:31 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 153843319773377.65884122012528; Mon, 1 Oct 2018 15:33:17 -0700 (PDT) Received: from localhost ([::1]:40981 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76kX-00084S-8u for importer@patchew.org; Mon, 01 Oct 2018 18:33:09 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76XV-00041R-04 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:19:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g76OF-0007Ht-Na for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:08 -0400 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]:38917) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g76OF-0007Hd-Gx for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:07 -0400 Received: by mail-wm1-x343.google.com with SMTP id q8-v6so280854wmq.4 for ; Mon, 01 Oct 2018 15:10:07 -0700 (PDT) Received: from x1.local (11.red-88-24-160.staticip.rima-tde.net. [88.24.160.11]) by smtp.gmail.com with ESMTPSA id 185-v6sm13554914wmy.38.2018.10.01.15.10.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 15:10:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8AHQ1gUm+bZGrBPi20N/vbi2namOl1g98QuH7hMaGu8=; b=GzMSfVXWogppDDgeia0TA/00Nnvwxi1QEtF3T2Ag5HoIVNn5pmzzT8QwslDlC849VC r1otn6c2KTJhOpUmZmBB4JgYwnvbQuOSZ0mz5hyHIUVMwtzKjWn0MBD0Ez9IKMAr6N23 JPH09e59ga4IX603ZKcYMT3GJbz4TyAou1KRE47EuD86TxP0EryN3QQ4UIuM58P4yOkO Lmjd9shgKzz6n2ODyYCrE8zM4BuzsJ2v6hgOguGDPYxVPhnl7rnQEoo20RoNpJ3tEiMr CHi5p3q/uzBSrJvp1qIj2Jk9fSdNFw0pfa7kEUvfPvC93r5DdyxwAht02yjG2FXeY9Zi yf2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=8AHQ1gUm+bZGrBPi20N/vbi2namOl1g98QuH7hMaGu8=; b=nD88c21uXUcVI1M/FzVYG2P1d5aVBTe5kk7NVepOWVsx4vrC4Ds/iYMi7SWxXZk4te iQyLsOGuqP1Y8ZjSHgOlK/2Q5NoVJ1NBUVW14O4iWlhbQE9P5BnXX/R/ghLL4a2fo0R6 dq09kedP7Oz0yAwEoB/WUOu+VUMT1ciIE61IhN0DhdvCZjluNlRRUvRp5gCXr++1iUt1 ti1Sakn8JFujiWZbuC2Xz3i8oLgpZQT6A8htr9vq7u8NinvN7ywNHw/fIYGt0BrPsRem FUdm1/beJT6Sr5Yj7OtS7Be/1E9pTtzmW0pUjA7wUe8sDAlMNWMxj6LxC+ZtvRK8o7xl 5Oyg== X-Gm-Message-State: ABuFfojiagoo9ltVLIQH+Ccrv+Qc6mO39t6j9PH6rLMuR9zFJ9SFV4BG aJ/Qlwy2c9Wu2Qgg7lbq/L8bYmTC X-Google-Smtp-Source: ACcGV62z8laK2xvZIkIfAuJ6I+yI2p+mp1ebFamjD28lwM3z3r69r2czY5skEdFU0/40FZm6NiHR3g== X-Received: by 2002:a1c:6:: with SMTP id 6-v6mr2544wma.126.1538431806563; Mon, 01 Oct 2018 15:10:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: Peter Maydell , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Tue, 2 Oct 2018 00:09:31 +0200 Message-Id: <20181001220942.2382-5-f4bug@amsat.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20181001220942.2382-1-f4bug@amsat.org> References: <20181001220942.2382-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::343 Subject: [Qemu-devel] [PATCH 04/15] hw/ssi/xilinx_spi: Use DeviceState::realize rather than SysBusDevice::init 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 Crosthwaite , Alistair Francis , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Eduardo Habkost , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Move from the legacy SysBusDevice::init method to using DeviceState::realiz= e. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Alistair Francis Reviewed-by: C=C3=A9dric Le Goater Reviewed-by: Thomas Huth --- hw/ssi/xilinx_spi.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/hw/ssi/xilinx_spi.c b/hw/ssi/xilinx_spi.c index 83585bc8b2..3dae303d5b 100644 --- a/hw/ssi/xilinx_spi.c +++ b/hw/ssi/xilinx_spi.c @@ -319,9 +319,9 @@ static const MemoryRegionOps spi_ops =3D { } }; =20 -static int xilinx_spi_init(SysBusDevice *sbd) +static void xilinx_spi_realize(DeviceState *dev, Error **errp) { - DeviceState *dev =3D DEVICE(sbd); + SysBusDevice *sbd =3D SYS_BUS_DEVICE(dev); XilinxSPI *s =3D XILINX_SPI(dev); int i; =20 @@ -344,8 +344,6 @@ static int xilinx_spi_init(SysBusDevice *sbd) =20 fifo8_create(&s->tx_fifo, FIFO_CAPACITY); fifo8_create(&s->rx_fifo, FIFO_CAPACITY); - - return 0; } =20 static const VMStateDescription vmstate_xilinx_spi =3D { @@ -368,9 +366,8 @@ static Property xilinx_spi_properties[] =3D { static void xilinx_spi_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); - SysBusDeviceClass *k =3D SYS_BUS_DEVICE_CLASS(klass); =20 - k->init =3D xilinx_spi_init; + dc->realize =3D xilinx_spi_realize; dc->reset =3D xlx_spi_reset; dc->props =3D xilinx_spi_properties; dc->vmsd =3D &vmstate_xilinx_spi; --=20 2.19.0