提交 918fd083 编写于 作者: E Eduardo Habkost 提交者: Peter Maydell

target-arm: use type_register() instead of type_register_static()

The type_register_static() interface is documented as:

  type_register_static:
  @info: The #TypeInfo of the new type.

  @info and all of the strings it points to should exist for the life
  time that the type is registered.

But cpu_register() uses a stack variable for the 'info' argument, so it
has to use type_register() instead of type_register_static().
Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 a6308bc2
......@@ -778,7 +778,7 @@ static void cpu_register(const ARMCPUInfo *info)
.class_size = sizeof(ARMCPUClass),
};
type_register_static(&type_info);
type_register(&type_info);
}
static const TypeInfo arm_cpu_type_info = {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册