From nobody Sun Nov 24 14:54:44 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1723529833; cv=none; d=zohomail.com; s=zohoarc; b=Kg2T7hs/Xw237xqR34UZkWEaVRt6aJBD+X1oW7rFqeeK7ZtsjOBrP3b0opxy3N0ygTQUoFXE9QqyiqzRMCoxLAlXNqmVL2agDhLvH+emhWysnXQaCNRiOVQvQBr75PrN/Y+kpzrktJjBrjpxqvE97opilEAH8tTV0C4RYLLrQ/M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1723529833; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=fEpDPUaFL8zPvYOx/0hsO+TqHl11ExTE7h8t0M0WvV0=; b=eKm8t672u2o/51c1VRM6qCZEws7I53g6Hr+gv+X3CF3E6oF1hpQDJwb5vse5+DpnY+E/KckT1/fvJAjJqtHLs9uMvo1ma13PsP1jdOtJOgKqEl8dY2QsoguiT+ZtfWqH6DSIry23T0xrTTi0tDn990X5AlATnHuCUF3qU81JJRw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 172352983338113.131226737890984; Mon, 12 Aug 2024 23:17:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sdkpi-0002h9-R0; Tue, 13 Aug 2024 02:16:40 -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 1sdkov-00082n-OF for qemu-devel@nongnu.org; Tue, 13 Aug 2024 02:15:51 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sdkoq-0003ay-8a for qemu-devel@nongnu.org; Tue, 13 Aug 2024 02:15:48 -0400 Received: by mail-pf1-x431.google.com with SMTP id d2e1a72fcca58-70ea2f25bfaso3653156b3a.1 for ; Mon, 12 Aug 2024 23:15:43 -0700 (PDT) Received: from localhost ([157.82.202.230]) by smtp.gmail.com with UTF8SMTPSA id 41be03b00d2f7-7c697a55b4bsm682700a12.73.2024.08.12.23.15.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 12 Aug 2024 23:15:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1723529743; x=1724134543; darn=nongnu.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=fEpDPUaFL8zPvYOx/0hsO+TqHl11ExTE7h8t0M0WvV0=; b=u42ITD3gX5ESXjMYKzYmGq7CM56NyeS/B1r0YJPsKfUwqgT0getD8fZF1ERt9SiWoZ vFYoZIn74fJzD12FWUREPIlaELdtLXF9h5de7V50Hk/6K6b6btpBU+jAEzkSkh71EcU+ wL9z4Pgrn2BbzbB22B8KXyjFMvmLPTgTSiWHt/q+u33QBB0lUZhmeZ5TeqtJxsbxVugj awPq1IFeD17Oi5S6/yU4ZGl5/lh+CUJZ0S/PsPnY0j++eWsuyS2AOmtPxzWmmmLAAfvl r9PketN4b6poHc+v/LahReY/2Wkd3RlYs1t/dq8gFEbi2S9lrIK+omdw0y0jB8B/qbMh u0KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723529743; x=1724134543; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fEpDPUaFL8zPvYOx/0hsO+TqHl11ExTE7h8t0M0WvV0=; b=bukDvPyLNdBJ5CdyomKzyA7oHZoL88dOhJhb20lQKa5qMsY8vDDFHTpWc5EXcBhCtR GEtzzhV3r0n+/ihDFhPQIRD+Ud5/HXYgfRdaJKCeXWJM2M/Ilqql0jw10fpbsiZEasEV 28ekCfyoBekcYvOiHX5ahbmeYHBNlgeD4pzBbYAU7/2gMTGXfUkIrVvPLRNeQeLYNOyM htRf6ygLN1s01kr6ld0p6M0Nt/t9X23Xy0gKhkY8IxS/mAar6NdXN3d7L0FZ3KRpRZkS CH3HM1eSZpJHGZ1/eNuaFr5FAL5fHIjfGbkJcx8lixRORkRbx2SExQzt5ALrAzEILqsX pZ1g== X-Gm-Message-State: AOJu0YyPOgD7Xdf8v60aZv3/vwKdQz44iq4QFNthYIbXOXytKaSRD8Ww wE393u+H3P53XHwEcXP/gFFXt0GxTGpLVEc/0YtUBZGNCyUL1Y0BHfWfOHHTkIo= X-Google-Smtp-Source: AGHT+IFIH3gjlPRuJ6nubMBXzagqt2IaxRLewnMy5VopTTtGPknA5PSV8gjmxP0UnQ+uLQPGroLLVA== X-Received: by 2002:a05:6a00:a8d:b0:70d:37f4:2c73 with SMTP id d2e1a72fcca58-7125510f688mr3025016b3a.10.1723529742776; Mon, 12 Aug 2024 23:15:42 -0700 (PDT) From: Akihiko Odaki Date: Tue, 13 Aug 2024 15:14:54 +0900 Subject: [PATCH for-9.2 v14 11/11] hw/qdev: Remove opts member MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240813-reuse-v14-11-4c15bc6ee0e6@daynix.com> References: <20240813-reuse-v14-0-4c15bc6ee0e6@daynix.com> In-Reply-To: <20240813-reuse-v14-0-4c15bc6ee0e6@daynix.com> To: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , "Michael S. Tsirkin" , Marcel Apfelbaum , Alex Williamson , =?utf-8?q?C=C3=A9dric_Le_Goater?= , Paolo Bonzini , =?utf-8?q?Daniel_P=2E_Berrang=C3=A9?= , Eduardo Habkost , Sriram Yagnaraman , Jason Wang , Keith Busch , Klaus Jensen , Markus Armbruster Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Akihiko Odaki X-Mailer: b4 0.14-dev-fd6e3 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: none client-ip=2607:f8b0:4864:20::431; envelope-from=akihiko.odaki@daynix.com; helo=mail-pf1-x431.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @daynix-com.20230601.gappssmtp.com) X-ZM-MESSAGEID: 1723529835136116600 It is no longer used. Signed-off-by: Akihiko Odaki Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Markus Armbruster --- include/hw/qdev-core.h | 4 ---- hw/core/qdev.c | 1 - system/qdev-monitor.c | 12 +++++++----- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 77bfcbdf732a..a3757e6769f8 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -237,10 +237,6 @@ struct DeviceState { * @pending_deleted_expires_ms: optional timeout for deletion events */ int64_t pending_deleted_expires_ms; - /** - * @opts: QDict of options for the device - */ - QDict *opts; /** * @hotplugged: was device added after PHASE_MACHINE_READY? */ diff --git a/hw/core/qdev.c b/hw/core/qdev.c index f3a996f57dee..2fc84699d432 100644 --- a/hw/core/qdev.c +++ b/hw/core/qdev.c @@ -706,7 +706,6 @@ static void device_finalize(Object *obj) dev->canonical_path =3D NULL; } =20 - qobject_unref(dev->opts); g_free(dev->id); } =20 diff --git a/system/qdev-monitor.c b/system/qdev-monitor.c index 6af6ef7d667f..3551989d5153 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -624,6 +624,7 @@ DeviceState *qdev_device_add_from_qdict(const QDict *op= ts, char *id; DeviceState *dev =3D NULL; BusState *bus =3D NULL; + QDict *properties; =20 driver =3D qdict_get_try_str(opts, "driver"); if (!driver) { @@ -705,13 +706,14 @@ DeviceState *qdev_device_add_from_qdict(const QDict *= opts, } =20 /* set properties */ - dev->opts =3D qdict_clone_shallow(opts); - qdict_del(dev->opts, "driver"); - qdict_del(dev->opts, "bus"); - qdict_del(dev->opts, "id"); + properties =3D qdict_clone_shallow(opts); + qdict_del(properties, "driver"); + qdict_del(properties, "bus"); + qdict_del(properties, "id"); =20 - object_set_properties_from_keyval(&dev->parent_obj, dev->opts, from_js= on, + object_set_properties_from_keyval(&dev->parent_obj, properties, from_j= son, errp); + qobject_unref(properties); if (*errp) { goto err_del_dev; } --=20 2.46.0