From patchwork Thu Oct 19 13:16:42 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: 735557 Delivered-To: patch@linaro.org Received: by 2002:adf:f0cd:0:b0:32d:baff:b0ca with SMTP id x13csp1510729wro; Thu, 19 Oct 2023 06:18:08 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH95aCjnbc2Lts2QBtCtG+9ctO0DMfwOffwLLp9krQA69GTc9c2cNYg/oui3QsshEKJUxuV X-Received: by 2002:adf:fccb:0:b0:329:6bdc:5a60 with SMTP id f11-20020adffccb000000b003296bdc5a60mr1275276wrs.12.1697721487805; Thu, 19 Oct 2023 06:18:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697721487; cv=none; d=google.com; s=arc-20160816; b=Duq+Y2H8UwH/dVd4yfpGgnS6QITkdaJR0Qg0/Q0oiVGsExNElmOyhX/HOs1AaKj+tz fQuO09Ex5kPj9YsT59dS55Yg3qvhyEYJXtzyHp1oIAgYoDBbDIDFrKmlIY0x+GakOqRj 46/jEECw06Zf7ceWqnNBYa17UKKj9LFTRy0LMb7P6+M1GEcSRMfe9HP6N3NhtXUpbtW6 cJxEdP0YXYlN5gocXodj+digIJduQVorfBlK5cYuhmT6tAmR4GFK7nu18bMZ/8g+pdXA QTb79khHnfqeXLTAZYWUQGB/uozvzY+SsEnBi5Ex85JmW+QhibBf05FISOQYbieBHsnw Jztw== 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=ldJFXb9fdD2sfJu6FP/y4XyBQnTwT0OjDzwlspACaHE=; fh=rHeFYfdIBBKOOSS9mUZgtP4QchBVe5KtMSS+2FE2cG0=; b=mWX0BFwDlj7WZ4FxF6wjiKO1suoOJ9vrnlY9a0MQqwaHary1z4Cgcs3x32oTVEcGrV C7Tw72oJC2u3VlW4qiVGPLnKPrA6SJZEa4guIFRcpbXw7G13UmzdQ/csfyHE3cJ3Jlf0 s4zTimTL7eDUDIbybMHEJjqfgBF13dI8X8SHAtSOWngtx4FXojygziLd7a8BRHPtYdD0 Pw2siJBfiv4iq7qEU86BcAzkINMt6z6ixm2lh8vRirTB3FunbfcGfi09jD2aoPAoIS+t FOgS8IyKBk9tOOHL3IXmC9madDj54g2V8QjQe/CWlZUO3AMws9UvyM/s4nIyUcUZmCPA EmEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="c/BBzh4o"; 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 e2-20020a5d5302000000b003232ef52522si2530225wrv.1005.2023.10.19.06.18.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 19 Oct 2023 06:18:07 -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="c/BBzh4o"; 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 1qtSuJ-0000P4-4D; Thu, 19 Oct 2023 09:17:47 -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 1qtSti-00009f-KQ for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:17:18 -0400 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qtStg-0003m0-GR for qemu-devel@nongnu.org; Thu, 19 Oct 2023 09:17:10 -0400 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-9be02fcf268so948163366b.3 for ; Thu, 19 Oct 2023 06:17:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697721425; x=1698326225; 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=ldJFXb9fdD2sfJu6FP/y4XyBQnTwT0OjDzwlspACaHE=; b=c/BBzh4oXBRMC0TDq4XMv9aSSM1ZadqILTg8dgf80riug5WNh/GC4OQ48g4DNjNATB oSB1ZUTTZ+zg42TJSXdOCKuVxifmoCRjAp+KvdhI0n4Bg4fyFdHlXaNeNxdgizwhEoEX DgrIi5J0GB1jFvEIzbBBi0F8kjSD3QVWxHD97NQ9/soMw7cQbS+iSoXeeGMaU+KHedRg yekYTWEf6+PLr/yg5mw3BH8BQ593oxwV0XXCyAnxZ+HGhHma5hjDToM8Cu/7N+Q0SKT9 CqnG7abEuATJ+399paqO6R/CMr33xv2jc94u/JPL28pLq2uOcm/iyKqAlmx+dq6UaMCf B2sw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697721425; x=1698326225; 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=ldJFXb9fdD2sfJu6FP/y4XyBQnTwT0OjDzwlspACaHE=; b=kW57UiYx5AUCKJqpKkJ8lx6bJlYMkN/LQxZ3FhsNC6CAQpnJqf/b+azNSkxvVeJBoP h+hwFgqIAtFaSCXp8hw1x+hQ2Rr0JrJKQRjRjpNIuDK1WUa8BzwFYeHxYjVPhI1OfLch HNE13RlEHK9xdCTPRFi1vlvMrMJmHPvqsHgsqftwmKBVoKqT9gICmGVR3d2Nc+/LYcCz n3q/wHZD8CuqpYz+8j3rD5MI/R6qE05apGE+ut6Gr3l3PvZEeWEoRVv3Pu45yxGT4GLb 7kd9vkrqHpI+QA2L/5xUYV6hAFGa75p2RUcLRh5g5jgN4r/U94o2GRlaRUvNT1bW9fvT SvoQ== X-Gm-Message-State: AOJu0Yw4OPYIoSATmKPZHj3wfM3mWr5LRb5CTjSQjlrowgHSXgJQXeCL 41VuGS4HnkAnmwkoYnGQSLp/XAqPlL0y3Ml9LrCrLQ== X-Received: by 2002:a17:907:2d10:b0:9b2:cf77:a105 with SMTP id gs16-20020a1709072d1000b009b2cf77a105mr1544701ejc.15.1697721424881; Thu, 19 Oct 2023 06:17:04 -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 qq20-20020a17090720d400b00997e99a662bsm3544760ejb.20.2023.10.19.06.17.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Thu, 19 Oct 2023 06:17:04 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , LIU Zhiwei , Nicholas Piggin , qemu-ppc@nongnu.org, David Gibson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Daniel Henrique Barboza , Harsh Prateek Bora , Thomas Huth , =?utf-8?b?RnLDqWTDqXJpYyBCYXJyYXQ=?= , =?utf-8?q?Phi?= =?utf-8?q?lippe_Mathieu-Daud=C3=A9?= Subject: [PATCH v3 2/7] hw/ppc/pnv_xscom: Rename pnv_xscom_realize(Error **) -> pnv_xscom_init() Date: Thu, 19 Oct 2023 15:16:42 +0200 Message-ID: <20231019131647.19690-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231019131647.19690-1-philmd@linaro.org> References: <20231019131647.19690-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=philmd@linaro.org; helo=mail-ej1-x633.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 --- 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;