qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Vivier <lvivier@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	"Edgar E . Iglesias" <edgar.iglesias@gmail.com>,
	David Gibson <david@gibson.dropbear.id.au>,
	Alistair Francis <alistair.francis@xilinx.com>,
	Antony Pavlov <antonynpavlov@gmail.com>,
	Beniamino Galvani <b.galvani@gmail.com>,
	Markus Armbruster <armbru@redhat.com>,
	qemu-arm@nongnu.org, Laurent Vivier <lvivier@redhat.com>
Subject: [Qemu-devel] [PATCH v2 4/4] qdev: remove cannot_destroy_with_object_finalize_yet
Date: Fri, 14 Apr 2017 10:37:17 +0200	[thread overview]
Message-ID: <20170414083717.13641-5-lvivier@redhat.com> (raw)
In-Reply-To: <20170414083717.13641-1-lvivier@redhat.com>

As all users have been removed, we can remove
cannot_destroy_with_object_finalize_yet field
from the DeviceClass structure.

Signed-off-by: Laurent Vivier <lvivier@redhat.com>
---
 include/hw/qdev-core.h | 13 -------------
 qmp.c                  |  5 -----
 2 files changed, 18 deletions(-)

diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h
index b44b476..ac682a6 100644
--- a/include/hw/qdev-core.h
+++ b/include/hw/qdev-core.h
@@ -113,19 +113,6 @@ typedef struct DeviceClass {
      * TODO remove once we're there
      */
     bool cannot_instantiate_with_device_add_yet;
-    /*
-     * Does this device model survive object_unref(object_new(TNAME))?
-     * All device models should, and this flag shouldn't exist.  Some
-     * devices crash in object_new(), some crash or hang in
-     * object_unref().  Makes introspecting properties with
-     * qmp_device_list_properties() dangerous.  Bad, because it's used
-     * by -device FOO,help.  This flag serves to protect that code.
-     * It should never be set without a comment explaining why it is
-     * set.
-     * TODO remove once we're there
-     */
-    bool cannot_destroy_with_object_finalize_yet;
-
     bool hotpluggable;
 
     /* callbacks */
diff --git a/qmp.c b/qmp.c
index a744e44..ab74cd7 100644
--- a/qmp.c
+++ b/qmp.c
@@ -548,11 +548,6 @@ DevicePropertyInfoList *qmp_device_list_properties(const char *typename,
         return NULL;
     }
 
-    if (DEVICE_CLASS(klass)->cannot_destroy_with_object_finalize_yet) {
-        error_setg(errp, "Can't list properties of device '%s'", typename);
-        return NULL;
-    }
-
     obj = object_new(typename);
 
     object_property_iter_init(&iter, obj);
-- 
2.9.3

  parent reply	other threads:[~2017-04-14  8:37 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-14  8:37 [Qemu-devel] [PATCH v2 0/4] qdev: remove all remaining cannot_destroy_with_object_finalize_yet Laurent Vivier
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 1/4] arm: remove " Laurent Vivier
2017-04-14 20:55   ` Alistair Francis
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 2/4] ppc: remove cannot_destroy_with_object_finalize_yet Laurent Vivier
2017-04-18  3:09   ` David Gibson
2017-04-21  1:45     ` [Qemu-devel] [Qemu-ppc] " David Gibson
2017-04-14  8:37 ` [Qemu-devel] [PATCH v2 3/4] versatile: " Laurent Vivier
2017-04-18 13:25   ` Markus Armbruster
2017-04-14  8:37 ` Laurent Vivier [this message]
2017-04-18 13:26   ` [Qemu-devel] [PATCH v2 4/4] qdev: " Markus Armbruster
2017-04-20 13:02 ` [Qemu-devel] [PATCH v2 0/4] qdev: remove all remaining cannot_destroy_with_object_finalize_yet Peter Maydell
2017-04-20 15:59   ` Markus Armbruster
2017-04-21  1:45     ` David Gibson
2017-04-21  5:40 ` Markus Armbruster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170414083717.13641-5-lvivier@redhat.com \
    --to=lvivier@redhat.com \
    --cc=alistair.francis@xilinx.com \
    --cc=antonynpavlov@gmail.com \
    --cc=armbru@redhat.com \
    --cc=b.galvani@gmail.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgar.iglesias@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).