From patchwork Thu Oct 19 21:17:49 2023 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: 735628 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1731829wro; Thu, 19 Oct 2023 14:25:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGPt6cNqaJZt2czsagf+I0H7Lg1vngxjSDVrUKqXJmeMWl1a+kQ/rXf7cyAjxRgKXIziTta X-Received: by 2002:a05:6214:4110:b0:66c:fb1d:2601 with SMTP id kc16-20020a056214411000b0066cfb1d2601mr131146qvb.5.1697750740704; Thu, 19 Oct 2023 14:25:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697750740; cv=none; d=google.com; s=arc-20160816; b=BTZfjP8dKS2MRsRProQHZpmB6EvR1Sk8QaHG4TDFqb5DNW3q+eyvmHOwqbDBhTmDJI iCehUxb1eGcsfotQzWPDiAI47wOHlqPhYHYzl7gz5puAv0d5IDdORlEYFxj5Vpl+G6UH /eVv33jr2c2nDXvG2f5lZKs0LfAOFNny1iXqRcfWGbeqJY0tD+weUYbwiY8ZHtdEkUC7 sPBfGkR3D0mf7dPdGYd2rkepB9ofwFNIw6rRiMAZSEW/Oehv7wziDLNPgF2Y/sBo/3L5 QggsmB/6ZoxqnwPnDT4T25+1FuA5lLIE3FkfG5EXbUoeBHPyipvQpqwgp40CDp7Arab7 BOAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3U1ctCoB2Patr0sOy1+nWAx2R2m9mUOpe8fog16ZiDc=; fh=gPUAZr3rG5AAum2cFS0vXpLjRIjvY8asn41zDrAXuoE=; b=ixLfGBzr9bIfgR4KZu8Vdrysmy0lkE8cXvOXnw1BMsTYjN31jir1KJv+q3Xg7aM/f/ gsh9U3oMYcdqzgeiDBH4xKQZilYeah9dm4qOpqC5wUmlBURrrbzLquCh1RQKBQ/y5uKe f09jWICnAoIsO46UOZ1uEWM67+/J/El9mXaMli8DXyg1xlFAHMmeRyBqDGMydXHuIPq4 IeA/7uIipBLvoLRdj1lmXDV3f40uQ9NysLUdw8O6B1GNM7OIe/b+gqmv3cYBPtYxyqXn 0myOsNLG0DGjdoEZkGCpqLpVdLrQ35TcXEkCIsnDixkbfnJeVbwJCpdCE0x0ood9zgs9 0c1A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hb23pGJm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id y6-20020a05622a120600b004128bd63451si276928qtx.493.2023.10.19.14.25.40 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 14:25:40 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hb23pGJm; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qtaRx-0000xC-45; Thu, 19 Oct 2023 17:21:01 -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 1qtaRv-0000wS-KG for qemu-devel@nongnu.org; Thu, 19 Oct 2023 17:20:59 -0400 Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtaRt-0005gn-U0 for qemu-devel@nongnu.org; Thu, 19 Oct 2023 17:20:59 -0400 Received: by mail-lj1-x22c.google.com with SMTP id 38308e7fff4ca-2c51388ccebso1489371fa.3 for ; Thu, 19 Oct 2023 14:20:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697750456; x=1698355256; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3U1ctCoB2Patr0sOy1+nWAx2R2m9mUOpe8fog16ZiDc=; b=hb23pGJmXToeKTmU3gP2MsVGPmWhHHR8/tzQZ4Js544D4usDcpUPREFe+Wb5Tl2XII dQ77WKvxkA/XfRWy4zeUPRwzemCDQ3z3UDVYGCJqCzYqj9vdZ1Jujiejc19kSgjU/BCt 6fBvxRYXw/O1zQXrdcbkDqHyPMPa1ia1emFiGu9PU3hT1Jc8sJFIf8ndVuXuEFvyji+y zjWAIvkfCz5AzTM8tzlP/BCNsld76CE1/MeDhow6qf1/avFiBFpjY7TnLHBlidPT1jvv oBaSKklxokeWV74elpCczDuiAYSO3fzXgZx+dbavRGc5I1zzJ6NNpY49SLmQLuyr6yQG CT+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697750456; x=1698355256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=3U1ctCoB2Patr0sOy1+nWAx2R2m9mUOpe8fog16ZiDc=; b=YJbNiGTo32VDJw0zxTkd7e5tGPYRw+tjryfQxLZPNGAbyLZ50gJ5cXp+jIlxsASc6V 8Fkn1qt9EmKeSJ8YVDx6nvVF3sRqOUYc9q3ayGTq559AHJwmyHRFrLyqzE/FpVCe65/4 LKG8Nr8XrCzTp4U9MyAew/JG+ZXltF/bH4dhdqHya5/TwZQwCp45flk2YhErAc56tv0T ByYrTbRbLVQPL49WJh3a8rj8xQw9nYv9rq/UmPljw0i+lzgoTpDd6rZ72A7+LWWFHu7V JIkZXYxsm4SqKTBnCZAFw0Yvtz17/FJcAcgPCewg8zzdsmYCKb9AboiznmZzN/XNBIHJ aJ2Q== X-Gm-Message-State: AOJu0Yzo+u47qv+8JBqd6jg32qDV/dnr9AuqaEcdbUX2KY4mm/iGsEAE YNpkN7Q27cfQfsrvfmwW4iBwBlh2iSX/I4bMc4xxtQ== X-Received: by 2002:a05:651c:1986:b0:2c0:afd:e7ed with SMTP id bx6-20020a05651c198600b002c00afde7edmr136679ljb.10.1697750456122; Thu, 19 Oct 2023 14:20:56 -0700 (PDT) Received: from m1x-phil.lan (176-131-216-177.abo.bbox.fr. [176.131.216.177]) by smtp.gmail.com with ESMTPSA id bh9-20020a05600c3d0900b003feae747ff2sm5380666wmb.35.2023.10.19.14.20.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 14:20:55 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-ppc@nongnu.org, qemu-s390x@nongnu.org, qemu-block@nongnu.org, qemu-arm@nongnu.org, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , Richard Henderson , Thomas Huth , LIU Zhiwei , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Nicholas Piggin , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= Subject: [PULL 24/46] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init() Date: Thu, 19 Oct 2023 23:17:49 +0200 Message-ID: <20231019211814.30576-25-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019211814.30576-1-philmd@linaro.org> References: <20231019211814.30576-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=philmd@linaro.org; helo=mail-lj1-x22c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org pnv_xscom_realize() is not used to *realize* QDev object, rename it as pnv_xscom_init(). The Error** argument is unused: remove it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Reviewed-by: LIU Zhiwei Reviewed-by: Cédric Le Goater Message-Id: <20231019131647.19690-3-philmd@linaro.org> --- include/hw/ppc/pnv_xscom.h | 2 +- hw/ppc/pnv.c | 18 +++--------------- hw/ppc/pnv_xscom.c | 2 +- 3 files changed, 5 insertions(+), 17 deletions(-) diff --git a/include/hw/ppc/pnv_xscom.h b/include/hw/ppc/pnv_xscom.h index 9bc6463547..41671001da 100644 --- a/include/hw/ppc/pnv_xscom.h +++ b/include/hw/ppc/pnv_xscom.h @@ -170,7 +170,7 @@ struct PnvXScomInterfaceClass { #define PNV10_XSCOM_PEC_PCI_BASE 0x8010800 /* index goes upwards ... */ #define PNV10_XSCOM_PEC_PCI_SIZE 0x200 -void pnv_xscom_realize(PnvChip *chip, uint64_t size, Error **errp); +void pnv_xscom_init(PnvChip *chip, uint64_t size); int pnv_dt_xscom(PnvChip *chip, void *fdt, int root_offset, uint64_t xscom_base, uint64_t xscom_size, const char *compat, int compat_size); diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index eb54f93986..456631c9dc 100644 --- a/hw/ppc/pnv.c +++ b/hw/ppc/pnv.c @@ -1249,11 +1249,7 @@ static void pnv_chip_power8_realize(DeviceState *dev, Error **errp) assert(chip8->xics); /* XSCOM bridge is first */ - pnv_xscom_realize(chip, PNV_XSCOM_SIZE, &local_err); - if (local_err) { - error_propagate(errp, local_err); - return; - } + pnv_xscom_init(chip, PNV_XSCOM_SIZE); sysbus_mmio_map(SYS_BUS_DEVICE(chip), 0, PNV_XSCOM_BASE(chip)); pcc->parent_realize(dev, &local_err); @@ -1512,11 +1508,7 @@ static void pnv_chip_power9_realize(DeviceState *dev, Error **errp) Error *local_err = NULL; /* XSCOM bridge is first */ - pnv_xscom_realize(chip, PNV9_XSCOM_SIZE, &local_err); - if (local_err) { - error_propagate(errp, local_err); - return; - } + pnv_xscom_init(chip, PNV9_XSCOM_SIZE); sysbus_mmio_map(SYS_BUS_DEVICE(chip), 0, PNV9_XSCOM_BASE(chip)); pcc->parent_realize(dev, &local_err); @@ -1727,11 +1719,7 @@ static void pnv_chip_power10_realize(DeviceState *dev, Error **errp) Error *local_err = NULL; /* XSCOM bridge is first */ - pnv_xscom_realize(chip, PNV10_XSCOM_SIZE, &local_err); - if (local_err) { - error_propagate(errp, local_err); - return; - } + pnv_xscom_init(chip, PNV10_XSCOM_SIZE); sysbus_mmio_map(SYS_BUS_DEVICE(chip), 0, PNV10_XSCOM_BASE(chip)); pcc->parent_realize(dev, &local_err); diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index d820e05e40..af57b55863 100644 --- a/hw/ppc/pnv_xscom.c +++ b/hw/ppc/pnv_xscom.c @@ -221,7 +221,7 @@ const MemoryRegionOps pnv_xscom_ops = { .endianness = DEVICE_BIG_ENDIAN, }; -void pnv_xscom_realize(PnvChip *chip, uint64_t size, Error **errp) +void pnv_xscom_init(PnvChip *chip, uint64_t size) { SysBusDevice *sbd = SYS_BUS_DEVICE(chip); char *name;