From nobody Mon Feb 9 04:14:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1614177996; cv=none; d=zohomail.com; s=zohoarc; b=gmQ+iQ4w2eYrK0KVTvCLPfe18KFgEJmYZX4GF3o9Gp93ogyaEGl4x2zCsrVdHv9S2HJ2pAESycV6kkQS57TW7X4uPCBBCqY/+KKrXkeHDGef0Y2WRbVue1MJQmsNb1iVamahyw9hNI2u70+3q5s1xJ2jUDD93Hj8shIAJKeBcJg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1614177996; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=j2zm2qamYNKsYNTtudWB9DrFDR64C6so6aYk0SXWUik=; b=PRR8V+KCXK45SBC/hnkPmRQKuojXiT0YRp7+kI3KPChsWZVsBsSmRNOOcxuHS3l2NVMpL8qokX6VVDUTI0LgDnNpof3gDpp38+vo6salvVYZO9Y+NECIDV9C8gYk3O+JgxVz1uB4bxYPoXL9DpMVsIx9UgF8msFBY6rf371BRAw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by mx.zohomail.com with SMTPS id 1614177996150867.987976680129; Wed, 24 Feb 2021 06:46:36 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-426-0hAP7PNbOseRIaXbPMjS1w-1; Wed, 24 Feb 2021 09:46:32 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9BC8882186; Wed, 24 Feb 2021 13:56:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6218619C46; Wed, 24 Feb 2021 13:56:04 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EE99158075; Wed, 24 Feb 2021 13:56:03 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 11ODu0ew017072 for ; Wed, 24 Feb 2021 08:56:00 -0500 Received: by smtp.corp.redhat.com (Postfix) id BB7995D743; Wed, 24 Feb 2021 13:56:00 +0000 (UTC) Received: from merkur.redhat.com (ovpn-114-142.ams2.redhat.com [10.36.114.142]) by smtp.corp.redhat.com (Postfix) with ESMTP id CEB055D6D3; Wed, 24 Feb 2021 13:55:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614177995; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=j2zm2qamYNKsYNTtudWB9DrFDR64C6so6aYk0SXWUik=; b=O6yZI/rJETlJ27IvZ4U5MTEv3fjj8sHkNUv62lnermTsUsqw7OE1lYGZ4OPCDtNRZHtONQ pQ5pMc9db5mi5BGGizY0ocwKgz6qQ3DdAyZmmcQyfkSdUyHzHfhx24qdBmIn+hyfCutp5f 9FBqv6/+IdL+3xgjYpEZd6Ft5MKBW8c= X-MC-Unique: 0hAP7PNbOseRIaXbPMjS1w-1 From: Kevin Wolf To: qemu-devel@nongnu.org Subject: [PATCH v2 22/31] qom: Remove user_creatable_add_dict() Date: Wed, 24 Feb 2021 14:52:46 +0100 Message-Id: <20210224135255.253837-23-kwolf@redhat.com> In-Reply-To: <20210224135255.253837-1-kwolf@redhat.com> References: <20210224135255.253837-1-kwolf@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: kwolf@redhat.com, lvivier@redhat.com, thuth@redhat.com, pkrempa@redhat.com, ehabkost@redhat.com, qemu-block@nongnu.org, libvir-list@redhat.com, jasowang@redhat.com, mreitz@redhat.com, kraxel@redhat.com, pbonzini@redhat.com, dgilbert@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This function is now unused and can be removed. Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- include/qom/object_interfaces.h | 18 ------------------ qom/object_interfaces.c | 32 -------------------------------- 2 files changed, 50 deletions(-) diff --git a/include/qom/object_interfaces.h b/include/qom/object_interface= s.h index 9b9938b8c0..5299603f50 100644 --- a/include/qom/object_interfaces.h +++ b/include/qom/object_interfaces.h @@ -86,24 +86,6 @@ Object *user_creatable_add_type(const char *type, const = char *id, const QDict *qdict, Visitor *v, Error **errp); =20 -/** - * user_creatable_add_dict: - * @qdict: the object definition - * @keyval: if true, use a keyval visitor for processing @qdict (i.e. - * assume that all @qdict values are strings); otherwise, use - * the normal QObject visitor (i.e. assume all @qdict values - * have the QType expected by the QOM object type) - * @errp: if an error occurs, a pointer to an area to store the error - * - * Create an instance of the user creatable object that is defined by - * @qdict. The object type is taken from the QDict key 'qom-type', its - * ID from the key 'id'. The remaining entries in @qdict are used to - * initialize the object properties. - * - * Returns: %true on success, %false on failure. - */ -bool user_creatable_add_dict(QDict *qdict, bool keyval, Error **errp); - /** * user_creatable_add_opts: * @opts: the object definition diff --git a/qom/object_interfaces.c b/qom/object_interfaces.c index b9a99c8bf4..7d8a4b77b8 100644 --- a/qom/object_interfaces.c +++ b/qom/object_interfaces.c @@ -104,38 +104,6 @@ out: return obj; } =20 -bool user_creatable_add_dict(QDict *qdict, bool keyval, Error **errp) -{ - Visitor *v; - Object *obj; - g_autofree char *type =3D NULL; - g_autofree char *id =3D NULL; - - type =3D g_strdup(qdict_get_try_str(qdict, "qom-type")); - if (!type) { - error_setg(errp, QERR_MISSING_PARAMETER, "qom-type"); - return false; - } - qdict_del(qdict, "qom-type"); - - id =3D g_strdup(qdict_get_try_str(qdict, "id")); - if (!id) { - error_setg(errp, QERR_MISSING_PARAMETER, "id"); - return false; - } - qdict_del(qdict, "id"); - - if (keyval) { - v =3D qobject_input_visitor_new_keyval(QOBJECT(qdict)); - } else { - v =3D qobject_input_visitor_new(QOBJECT(qdict)); - } - obj =3D user_creatable_add_type(type, id, qdict, v, errp); - visit_free(v); - object_unref(obj); - return !!obj; -} - Object *user_creatable_add_opts(QemuOpts *opts, Error **errp) { Visitor *v; --=20 2.29.2