From patchwork Fri Oct 1 17:33:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Philippe Brucker X-Patchwork-Id: 515112 Delivered-To: patch@linaro.org Received: by 2002:a02:606e:0:0:0:0:0 with SMTP id d46csp1034627jaf; Fri, 1 Oct 2021 11:01:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyV8VWXNRefZVS/JV6Fxd6mzX+cglF9lZr32HTSutnF3km0zUFlEF9I3yJ5KzQJQwk4jBe8 X-Received: by 2002:adf:ab4a:: with SMTP id r10mr1993805wrc.48.1633111296763; Fri, 01 Oct 2021 11:01:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633111296; cv=none; d=google.com; s=arc-20160816; b=tcV9mTIIFEZyWBWknPdvo6cH3sx1JDrM2NApLDJrHbGaPwedDyjm7ZQrTF+dGxZ7li uC85fx7X8SWY5hwMydwi9YlByEoa7alE+gTLglk20w6SQKoYEgFHi2o6QQODrEshIu8D 7dn59BwFURLKIPdil2UC5uwmTj5BodRyws5evBryEzHfGMoktT0wrYtIWtlzDwnzoTiW V0fKA6otZCPf1mc3RKiCdFjZ5HzirAfgIIzVVJUfKb/2UThy9UhnlOQSuVq6EwwR7MXF hpTnEVKKD8+M0ERoMnKe7xa3uU5iHReqqG0tQEBiQ975jnwysT85ZKPfchS373LWzsCK p1gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc: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:to:from :dkim-signature; bh=ezcbvk/+kLD6i+tf1SI+n2SWS5P4d5inXJz75DvTmhM=; b=zjNV6+iObihabXAUYfd4BeSA53HmK0+vBr84PFJ4tdZNTqBHk6esPDGNYJ5R0Br8Rk npB1sG0QoH7mB9WNLQb4gpTLu00TNS5/wPoRlULuEkUmkHhKRqFivzaAmaXhn2vunTcM HUuez4YlVc3IegeYjNrRXZ/lYuOY4b1vsmK156sk1isfS8WMzfQ/4KXUg98uIpSZYTTO NjS+WQVwRadf3D/gO8jrZn6M7sb6w6EUsCP+diKoSCEVJ1Lpw8VMC7NNAsMceTsIlYQr DJkKWaW+nQB9POxZaChSDS61+Q3tcejYaTuh153EVqsy/wHdE1qjskl2h9F+boYRJDVn R7Bg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=ybZ9ULUb; 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=fail (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 f7si8752142wri.55.2021.10.01.11.01.36 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 01 Oct 2021 11:01:36 -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=fail header.i=@linaro.org header.s=google header.b=ybZ9ULUb; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:55704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mWMql-0002OH-B1 for patch@linaro.org; Fri, 01 Oct 2021 14:01:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60704) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mWMUG-0000XP-1G for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:22 -0400 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]:41561) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mWMUD-0000jC-7P for qemu-devel@nongnu.org; Fri, 01 Oct 2021 13:38:19 -0400 Received: by mail-wm1-x32b.google.com with SMTP id g19-20020a1c9d13000000b003075062d4daso7288599wme.0 for ; Fri, 01 Oct 2021 10:38:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ezcbvk/+kLD6i+tf1SI+n2SWS5P4d5inXJz75DvTmhM=; b=ybZ9ULUbYc9FQ/tepxzqHXkP07aCwVxeouYzulmVK3/AMQ1oqtjSM4CziQ5LM+xCFo +2nVqlfhP9Ktj4iIv1I4iqBuB5AKLNt0WsMLcZKl9DwENLZCxER4X97euLpjomDwX+Xo XAR6iU6RQhAsBGeK3YHa1ku0KCDFPei5+X7mvlP3nV1aQG0GASk/2sY+YWVZsOgW9iTB RSMvJWQCtcDPqMmrNFnOnk+PmiYlznL7J1+xvEBepKnsV15TRW7z7gP7Movy9hfjNSOR 4cGs88bLTehDlLwrJsX59A/WhzwAkTTMHKBC39dS2D0QteV8GfVYYLJonVvhEoksD4ZB UvaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ezcbvk/+kLD6i+tf1SI+n2SWS5P4d5inXJz75DvTmhM=; b=gVRJ5mACik3mr0I60B+DixSoxb76qa7Y+JNK7r39MlMmFyW3L6edI65gSb4Jo2io20 bjaRDwajR0nf5kD/VcAa7Va/B7Fk1eFA92LGhckQUS75YAx2BatohUx99XKakdTUmkoC CZTqLkS9PTNkmJnwArnfPxfEtfLYYyV0kHklY+lAJn8EkZouO+lbOnJxcLZNzxtM78q1 et93fLPY5U8RV9RHFdYvfIVH5y4CyCeuLVAFl3UB3kSAs8IqyAN4H1mwrhcoUeF7dSyF 1MQA19/Bc69DjHq3v1/q0csvNCzOrBls9uwSc/ySxmi15JJmifIccTS21GCztugXGXI3 9tmw== X-Gm-Message-State: AOAM532S/EvgtdZNan+F5Qup1GRImBoPPG2Fts5LhDsIkstryvdRjPGy lzMCqlJZviQA/HAUgAJVrRWQPw== X-Received: by 2002:a1c:1d92:: with SMTP id d140mr6071526wmd.17.1633109895826; Fri, 01 Oct 2021 10:38:15 -0700 (PDT) Received: from localhost.localdomain (cpc92880-cmbg19-2-0-cust679.5-4.cable.virginm.net. [82.27.106.168]) by smtp.gmail.com with ESMTPSA id k9sm6186592wrz.22.2021.10.01.10.38.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:38:15 -0700 (PDT) From: Jean-Philippe Brucker To: eric.auger@redhat.com, imammedo@redhat.com Subject: [PATCH v4 05/11] hw/arm/virt: Use object_property_set instead of qdev_prop_set Date: Fri, 1 Oct 2021 18:33:53 +0100 Message-Id: <20211001173358.863017-6-jean-philippe@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001173358.863017-1-jean-philippe@linaro.org> References: <20211001173358.863017-1-jean-philippe@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=jean-philippe@linaro.org; helo=mail-wm1-x32b.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=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org, ehabkost@redhat.com, mst@redhat.com, richard.henderson@linaro.org, qemu-devel@nongnu.org, shannon.zhaosl@gmail.com, Jean-Philippe Brucker , qemu-arm@nongnu.org, ani@anisinha.ca, pbonzini@redhat.com Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" To propagate errors to the caller of the pre_plug callback, use the object_poperty_set*() functions directly instead of the qdev_prop_set*() helpers. Suggested-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker --- hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.33.0 Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 36f0261ef4..ac307b6030 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2465,8 +2465,9 @@ static void virt_machine_device_pre_plug_cb(HotplugHandler *hotplug_dev, db_start, db_end, VIRTIO_IOMMU_RESV_MEM_T_MSI); - qdev_prop_set_uint32(dev, "len-reserved-regions", 1); - qdev_prop_set_string(dev, "reserved-regions[0]", resv_prop_str); + object_property_set_uint(OBJECT(dev), "len-reserved-regions", 1, errp); + object_property_set_str(OBJECT(dev), "reserved-regions[0]", + resv_prop_str, errp); g_free(resv_prop_str); } }