From patchwork Mon Oct 1 22:09:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 977506 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; dmarc=none (p=none dis=none) header.from=amsat.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="RtqynM8N"; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42PH1l3C3Lz9sB4 for ; Tue, 2 Oct 2018 08:26:18 +1000 (AEST) Received: from localhost ([::1]:40947 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76ds-0001SQ-7d for incoming@patchwork.ozlabs.org; Mon, 01 Oct 2018 18:26:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35160) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g76XV-00041Z-EA for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:19:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g76OE-0007HR-F7 for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:08 -0400 Received: from mail-wr1-x441.google.com ([2a00:1450:4864:20::441]:36961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g76OE-0007HK-8d for qemu-devel@nongnu.org; Mon, 01 Oct 2018 18:10:06 -0400 Received: by mail-wr1-x441.google.com with SMTP id u12-v6so15632854wrr.4 for ; Mon, 01 Oct 2018 15:10:06 -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=dD+oT1d73kI+T4UbkBU9325q4bnyCtuyUiCPOgRUgIc=; b=RtqynM8NRafaOJFrqE2yUNOyRd6kh//Pr2JS5mpMptWPjc2h/Q2l+rNvwHINKtNKD2 8H6j1IWSRBB/6xsNk32nunS3o/TFzTPuuCA5fTqI0ZSEclRCyeZP6FnLp/ZUHm9DfU1D wLCZkv9LVzAoEL1nXc7Eqr8uQC/A34mz8caUCqPWTURNP89NPzkEIPG6pG5ZgfMQgb67 FjXRYr0IHYeJWvqgMvb6ojoL/AlRTJqKPcv+3CynT9zkCJBFW3h0HJI4Usp1ZziZl9L3 SC3jlMVI6zx9qRbd/8t+Rhn+QzP9tHhmufxbcysPwPjMZfcxcEqygXZGzhci1zdADAvV qOgQ== 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=dD+oT1d73kI+T4UbkBU9325q4bnyCtuyUiCPOgRUgIc=; b=Ss3OzIdpyaDK1vln7JzHgK7CpV94mXn/TjGmrC8tAfbyYJoo9UegDQgvBhcPMNcbBU Vv3qeJW6Ru0qKaOkzRFadSrpNdb5OhtfoAk8K6GptXZUJb/nux5L4lhiBlMaeXgPKm/Z CC4AnkifGWBAO2IsJfOM9XLLubsfY0kQTqoX9YhPI+kbROCYT+lJ01Ikf1+D+lv88xBA /aTqr3KgTdAEuUSl8zqLZXI8qY3IG1HuRHXwwSODN+inQphsyvI21LROvC8r4mlk5wgX 0856y/h0A/3BS0uPBmDOWffcmis7+WJR7XEyK5XvyjSkIWxHcNpWnldTv+0SVBNV5ft+ rbMg== X-Gm-Message-State: ABuFfohuaBCEbW7dtivPQH+QxqafM0LgtvdZmeELYnKglBDPs1cyrgme 0A+3qp2AB2rUjY140fIAzOE= X-Google-Smtp-Source: ACcGV60OUvJaPh1iSglHSagTcksxWPabys91Z5cHHRHB7AT2psVy10EmFpFCYsfGJqZrs5XBgqp82A== X-Received: by 2002:a5d:540d:: with SMTP id g13-v6mr5927998wrv.4.1538431805381; Mon, 01 Oct 2018 15:10:05 -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.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 01 Oct 2018 15:10:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: Peter Maydell , =?utf-8?q?C=C3=A9dric_Le_Goa?= =?utf-8?q?ter?= Date: Tue, 2 Oct 2018 00:09:30 +0200 Message-Id: <20181001220942.2382-4-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 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::441 Subject: [Qemu-devel] [PATCH 03/15] hw/timer/sun4v-rtc: 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: Artyom Tarasenko , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?b?ZMOp?= , Eduardo Habkost , qemu-devel@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" Move from the legacy SysBusDevice::init method to using DeviceState::realize. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Cédric Le Goater --- hw/timer/sun4v-rtc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/timer/sun4v-rtc.c b/hw/timer/sun4v-rtc.c index 13be94f8da..4e7f6a1eff 100644 --- a/hw/timer/sun4v-rtc.c +++ b/hw/timer/sun4v-rtc.c @@ -63,21 +63,21 @@ void sun4v_rtc_init(hwaddr addr) sysbus_mmio_map(s, 0, addr); } -static int sun4v_rtc_init1(SysBusDevice *dev) +static void sun4v_rtc_realize(DeviceState *dev, Error **errp) { + SysBusDevice *sbd = SYS_BUS_DEVICE(dev); Sun4vRtc *s = SUN4V_RTC(dev); memory_region_init_io(&s->iomem, OBJECT(s), &sun4v_rtc_ops, s, "sun4v-rtc", 0x08ULL); - sysbus_init_mmio(dev, &s->iomem); - return 0; + sysbus_init_mmio(sbd, &s->iomem); } static void sun4v_rtc_class_init(ObjectClass *klass, void *data) { - SysBusDeviceClass *k = SYS_BUS_DEVICE_CLASS(klass); + DeviceClass *dc = DEVICE_CLASS(klass); - k->init = sun4v_rtc_init1; + dc->realize = sun4v_rtc_realize; } static const TypeInfo sun4v_rtc_info = {