qdev/qom: remove some TODO limitations now that PROP_PTR is gone
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Sat, 26 Oct 2019 20:55:46 +0000 (22:55 +0200)
committerMarc-André Lureau <marcandre.lureau@redhat.com>
Tue, 7 Jan 2020 13:24:29 +0000 (17:24 +0400)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
hw/core/qdev.c
qom/qom-qmp-cmds.c

index aa3ccbf2ecdbabb18033a6ad3c8dc6bcd2df3d78..9f1753f5cfe8374e0cd661110467f821d87d2d68 100644 (file)
@@ -736,14 +736,6 @@ void qdev_property_add_static(DeviceState *dev, Property *prop,
     if (prop->info->create) {
         prop->info->create(obj, prop, &local_err);
     } else {
-        /*
-         * TODO qdev_prop_ptr does not have getters or setters.  It must
-         * go now that it can be replaced with links.  The test should be
-         * removed along with it: all static properties are read/write.
-         */
-        if (!prop->info->get && !prop->info->set) {
-            return;
-        }
         object_property_add(obj, prop->name, prop->info->name,
                             prop->info->get, prop->info->set,
                             prop->info->release,
index 236e8e41dda4ab68b54ece9775037627e9c9a1e2..f4494f98ac93312f9d97e50adf00065ca5a4286a 100644 (file)
@@ -142,16 +142,6 @@ static ObjectPropertyInfo *make_device_property_info(ObjectClass *klass,
                 continue;
             }
 
-            /*
-             * TODO Properties without a parser are just for dirty hacks.
-             * qdev_prop_ptr is the only such PropertyInfo.  It's marked
-             * for removal.  This conditional should be removed along with
-             * it.
-             */
-            if (!prop->info->set && !prop->info->create) {
-                return NULL;           /* no way to set it, don't show */
-            }
-
             info = g_malloc0(sizeof(*info));
             info->name = g_strdup(prop->name);
             info->type = default_type ? g_strdup(default_type)