@@ -1036,33 +1036,6 @@ void qdev_prop_register_global_list(GlobalProperty *props)
}
}
-int qdev_prop_check_globals(void)
-{
- GList *l;
- int ret = 0;
-
- for (l = global_props; l; l = l->next) {
- GlobalProperty *prop = l->data;
- ObjectClass *oc;
- DeviceClass *dc;
- if (prop->used) {
- continue;
- }
- if (!prop->user_provided) {
- continue;
- }
- oc = object_class_by_name(prop->driver);
- dc = DEVICE_CLASS(oc);
- if (!dc->hotpluggable && !prop->used) {
- error_report("Warning: global %s.%s=%s not used",
- prop->driver, prop->property, prop->value);
- ret = 1;
- continue;
- }
- }
- return ret;
-}
-
static void qdev_prop_set_globals_for_type(DeviceState *dev,
const char *typename)
{
@@ -191,7 +191,6 @@ void qdev_prop_set_ptr(DeviceState *dev, const char *name, void *value);
void qdev_prop_register_global(GlobalProperty *prop);
void qdev_prop_register_global_list(GlobalProperty *props);
-int qdev_prop_check_globals(void);
void qdev_prop_set_globals(DeviceState *dev);
void error_set_from_qdev_prop_error(Error **errp, int ret, DeviceState *dev,
Property *prop, const char *value);
@@ -4623,7 +4623,6 @@ int main(int argc, char **argv, char **envp)
}
}
- qdev_prop_check_globals();
if (vmstate_dump_file) {
/* dump and exit */
dump_vmstate_json_to_file(vmstate_dump_file);
qdev_prop_check_globals() tries to warn the user if a given -global option was not used. But it does that only if the device is not hotpluggable. The warning also makes it harder for management code or people that write their own scripts or config files: there's no way to know if a given -global option will trigger a warning or not, because we don't have any introspection mechanism to check if a machine-type instantiates a given device or not. The warning is also the only reason we have the 'user_provided' and 'used' fields in struct GlobalProperty. Removing the check will let us simplify the code. In other words, the warning is nearly useless and gets in our way and our users' way. Remove it. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> --- hw/core/qdev-properties.c | 27 --------------------------- include/hw/qdev-properties.h | 1 - vl.c | 1 - 3 files changed, 29 deletions(-)