From nobody Thu Nov 14 17:52:45 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=1708431990; cv=none; d=zohomail.com; s=zohoarc; b=W+K7ZMTZoCstgHig4dJo8NjMDeTJgjrOJWUAIj7kZrn7Dh41hJwSruetGzYdOWdGmeKqVYlAycvS9eu4ZWdfzm64a9oZYH6VtLQtl5GmQkk6EIU82s1sZQ89CmqKipGGkPTHPpA6wpfi0EoIoCalK+TVlwwQvALnKIIXOPwD1d8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708431990; 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=UlKagWgW/Suhx5XrwPdfnlsQ3+kK6LLiHW7W/dUMHaY=; b=Kmhhd5exPFw4PuHX/JCI+Hw1jmAt0ixjRNDnZGrNBiXyS2HLjjlOjfi8LRjjGsel6FjVd+Gj/DYeQn1r0BUqVRDqeK05Y3SpZfMML7SLz20+tBFO04T+pZUjkDd1jGoLE2mTkHrlMq1KQvF98AUMXyaM6e//PFjpOec5i+JKgqQ= 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 1708431990134398.34640025675617; Tue, 20 Feb 2024 04:26:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcPCL-0006Qt-H1; Tue, 20 Feb 2024 07:26:09 -0500 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 1rcPCA-00060N-UG for qemu-devel@nongnu.org; Tue, 20 Feb 2024 07:26:00 -0500 Received: from mail-pl1-x62d.google.com ([2607:f8b0:4864:20::62d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rcPC9-0006Kc-7z for qemu-devel@nongnu.org; Tue, 20 Feb 2024 07:25:58 -0500 Received: by mail-pl1-x62d.google.com with SMTP id d9443c01a7336-1dba6b9b060so26182245ad.1 for ; Tue, 20 Feb 2024 04:25:56 -0800 (PST) Received: from localhost ([157.82.203.206]) by smtp.gmail.com with UTF8SMTPSA id ko6-20020a17090307c600b001dc10796959sm1700921plb.284.2024.02.20.04.25.52 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 20 Feb 2024 04:25:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=daynix-com.20230601.gappssmtp.com; s=20230601; t=1708431956; x=1709036756; 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=UlKagWgW/Suhx5XrwPdfnlsQ3+kK6LLiHW7W/dUMHaY=; b=QVpQfLvRz372Q+a92914tV18cxEVjKREcPCd2WXXeLeqFUND0v48GaHYRl8LONJWfz HQIstCX1JJRzuO51qQPpyLp9oX97DxpUzSaeFzBimIfOZ/C90mhvWoHFGGDoH72tbsrG r0tEFiES+GUss7sApsKaeUTTNIkOEYx/2t4lX3OrGEAROCmlwtKCWoPBLz10gv1NklhT WGGh6BqEoHieQ34cP8n+A3UYeX+Tf0VjCmRdIBJK5DiuRTVYcYREabdXKXDNkN/IRjcG +grAMlkZPnevf516PF13/odFBDuzSzk7rEofZH7eNHpQOoP6MIXdYwHeuxGwMaOF8Kcq AM+w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708431956; x=1709036756; 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=UlKagWgW/Suhx5XrwPdfnlsQ3+kK6LLiHW7W/dUMHaY=; b=AnRrHZ++/oiRzhlPn2QnRtTviCdDVIzMJ6PHxtlJsO31TImo8pjRa6BDsnrfAQ0agn vvd2uojM6woqisLY8DeIb+HeqCUIyW6ClvAbHlXX1c8592iT6vSog9G0GayuJQFA0Ih6 ePR39Sq2Z5Zj4nBiu5w71hod6EgRobNaTVP6/8tQC2h0xCTW68vjMGI6gepHIRbTsBH0 Ke3uC+3TGwQxiyHL+ha6kjHNVKiSvxg0mZLimQ6fmeCHFDV9r2ZMU9AvBZpbh3gPSP4w UZc1nAdlC4wrMC8r6Cz8fKNtuJdVWDwCx2CwIxnSQ/5dk20O2YU57w9WdvDnnJcFHpxT QHkQ== X-Gm-Message-State: AOJu0YwJnElsDVeAAJ2WXsrgJUFjFrwh/xe1sSzTT9HTFY+9BJDV3ifz cG9Dn368JXZbq6IzhaltlzICshbVZzfDszH+dZSSj0qc7nAZlWJizhQYTLIvjbw= X-Google-Smtp-Source: AGHT+IEeIAWtGETAzOIxdaBUCjr99X3nyHlqYq9vG/XsVMzqBDlxsY6oz8YL40IiB7FEiSBMx3pFfA== X-Received: by 2002:a17:902:da81:b0:1db:cb4c:1202 with SMTP id j1-20020a170902da8100b001dbcb4c1202mr11680911plx.8.1708431956035; Tue, 20 Feb 2024 04:25:56 -0800 (PST) From: Akihiko Odaki Date: Tue, 20 Feb 2024 21:24:50 +0900 Subject: [PATCH v6 15/15] hw/qdev: Remove opts member MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240220-reuse-v6-15-2e42a28b0cf2@daynix.com> References: <20240220-reuse-v6-0-2e42a28b0cf2@daynix.com> In-Reply-To: <20240220-reuse-v6-0-2e42a28b0cf2@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 Cc: qemu-devel@nongnu.org, qemu-block@nongnu.org, Akihiko Odaki X-Mailer: b4 0.12.3 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::62d; envelope-from=akihiko.odaki@daynix.com; helo=mail-pl1-x62d.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-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=ham 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: 1708431991734100001 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 9228e96c87e9..5954404dcbfe 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 c68d0f7c512f..7349c9a86be8 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 a13db763e5dd..71c00f62ee38 100644 --- a/system/qdev-monitor.c +++ b/system/qdev-monitor.c @@ -625,6 +625,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.43.1