From patchwork Wed Dec 15 10:40:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 524276 Delivered-To: patch@linaro.org Received: by 2002:a05:6e04:2287:0:0:0:0 with SMTP id bl7csp250760imb; Wed, 15 Dec 2021 03:39:56 -0800 (PST) X-Google-Smtp-Source: ABdhPJyuBC96VoPjDWx5KsIgwIlmgBCWHQ0GK0JdsQBqPeAeQ5Mj5HnGAVYOK6FIeGe+7qzNvdDa X-Received: by 2002:a05:6e02:1a65:: with SMTP id w5mr6073740ilv.57.1639568396718; Wed, 15 Dec 2021 03:39:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1639568396; cv=none; d=google.com; s=arc-20160816; b=c9S6ZlDXTXDcuVejL0Exdao/WtHJUH0Iu6Gl/5tkEWG50UigxwZ2oXZqcKyivqLU1Q mrVIBny9RbFxXUNvSzeVawrt6XqwnFAYHPKY928VvGU6SOHEoZPUECLqdJVkVvIiNLUm kyq6EJDpogm54Dli4H3L+omToWk/AAnzn2U7tivSx6AskaURBSE+cGIaSHNGZC0tkUoL bz46KOxrQ967IQta/x8QjOa2FU5q/JRwPQ0cu1GyycDiXZS/O42aAGI0tlH+nZiS2zJW zBcjAFQppu0zbtox2wYgk25+rjHzeh17AiVh9fN3zdQ7rjLipz5bBUhu8H17T/6dBqkj lxgQ== 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:to:from :dkim-signature; bh=sNNQW6d9QcHylqNB7F7ihK/G2DuCR/LnfVagA5pSg9U=; b=bp1JnTGFLXHiQZXA3ooEb3MeTy+4GgsdBgqaygjU+ZrzvoFjR5G/pNhptF0srYM3Iz /HoLVL+DZduU/CZffYvcldTJuQKG8BpG2uYdP5CMl1Z95Qb4hOeRb06okQCEDSDjBQ3W sSEhRMYv+ScmHQAlxxLz7KyUAerPi2ChXTMQbUUpOU/g6JaeJL9NrbRkZBHsU00gOY/+ K/FfkHZfcnAyqEyd1fWtQM+p2icFUN1zo8w5KGrV9rbYyVwekfcxLuBH8OhbTHoJI4mF V36tHDvnwZwAiLH1H+WI6xK5ls5gSqgMfABAZL4t+KOD826WGjaEocPlgWQPQjefn0xM wNrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gkIH1z9D; 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 b13si583959jat.38.2021.12.15.03.39.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 15 Dec 2021 03:39:56 -0800 (PST) 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=gkIH1z9D; 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]:57326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mxSdY-000897-5x for patch@linaro.org; Wed, 15 Dec 2021 06:39:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:41618) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mxRij-0007NL-RK for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:41:13 -0500 Received: from [2a00:1450:4864:20::42a] (port=46871 helo=mail-wr1-x42a.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mxRie-0000Hp-5E for qemu-devel@nongnu.org; Wed, 15 Dec 2021 05:41:12 -0500 Received: by mail-wr1-x42a.google.com with SMTP id i22so7569213wrb.13 for ; Wed, 15 Dec 2021 02:41:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=sNNQW6d9QcHylqNB7F7ihK/G2DuCR/LnfVagA5pSg9U=; b=gkIH1z9D9MU8jcSNsZQ+Xsm2DZBzXkmb3Ifx/q+sToljimUiVs5zZkEBJPsQsx7YOV 4gVMHDaHjwZS13k+3zf2Tf3B+xa3eUbG45LVVpI0wHOai9A8cpfkyJ7+Fg92l1ICNajc 6Kv0REoQ07bd1E8uyrp/4JaK6oVyMzgPgOMOOMSVZ0V7eyABnPOePekzy7mKcz9eJtOR c1CugnY8GogD+2JQevTLqbkP3C4mRVFC0ppHnYOaWyGKQhhK78URQjO/7Wbg6zr84ONt ABGMRkvZtADEMTHpY+/X9259vx7yePTb5HuaVPiOMQHIAIB+69tsIun0V432rhcFmAiM Ujew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sNNQW6d9QcHylqNB7F7ihK/G2DuCR/LnfVagA5pSg9U=; b=o/+ObHyTROM5Mq7zw83hCzxgun7SBbjXjXHmCsxJL0VcrEPt67k9BHWK/Q1KGy6akj DGzPhtRjQvULmsbgACvH1oSQWWz3VRRCXiUHkHtnf80ykPRVRgZb48RvpvOpxHC0WHGN WA5I1Wzzc4XkxCfzgcdHhX1rWn9tNSCMyod9oJyPUX/o3GAskSBFwt6Sqi8O3Kwi7nFo ZeegdZNuMPtNW3YtTD586To4ZHONoFctkjUQJkGWzOPpn1q+MyiPPQgfhFYX2+29MNKS 5JBqe1irJJbg2tRrIleTUw7NlVFhqHAAMArEW9b6UwCav1Fb/+b5o0MifUSI1km5iJa+ ETgw== X-Gm-Message-State: AOAM531kuthcXjcbKz275qjkzU99ujnYc8UTwY7GjNcFmJ5rIgfTKxnH 2hv2aejpsDErPyjUc0YcTmEWi+OOO/i2ZQ== X-Received: by 2002:a05:6000:2ac:: with SMTP id l12mr3678166wry.441.1639564866923; Wed, 15 Dec 2021 02:41:06 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id e18sm1600815wrs.48.2021.12.15.02.41.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 02:41:06 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 29/33] hw/arm/virt: Use object_property_set instead of qdev_prop_set Date: Wed, 15 Dec 2021 10:40:45 +0000 Message-Id: <20211215104049.2030475-30-peter.maydell@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211215104049.2030475-1-peter.maydell@linaro.org> References: <20211215104049.2030475-1-peter.maydell@linaro.org> MIME-Version: 1.0 X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42a (failed) Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42a.google.com X-Spam_score_int: -12 X-Spam_score: -1.3 X-Spam_bar: - X-Spam_report: (-1.3 / 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, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no 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" From: Jean-Philippe Brucker 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 Reviewed-by: Eric Auger Reviewed-by: Igor Mammedov Signed-off-by: Jean-Philippe Brucker Message-id: 20211210170415.583179-5-jean-philippe@linaro.org Signed-off-by: Peter Maydell --- hw/arm/virt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 41c9808a3fd..6bce595aba2 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2517,8 +2517,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); } }