mirror of https://github.com/xemu-project/xemu.git
target/hppa: Remove object_class_is_abstract()
Since commit3a9d0d7b64
("hw/cpu: Call object_class_is_abstract() once in cpu_class_by_name()"), there is no need to check if @oc is abstract because it has been covered by cpu_class_by_name(). Signed-off-by: Gavin Shan <gshan@redhat.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-ID: <20231114235628.534334-3-gshan@redhat.com> [PMD: Mention commit3a9d0d7b64
] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
parent
9c115f68e2
commit
b0b8fa1814
|
@ -162,9 +162,7 @@ static ObjectClass *hppa_cpu_class_by_name(const char *cpu_model)
|
||||||
g_autofree char *typename = g_strconcat(cpu_model, "-cpu", NULL);
|
g_autofree char *typename = g_strconcat(cpu_model, "-cpu", NULL);
|
||||||
ObjectClass *oc = object_class_by_name(typename);
|
ObjectClass *oc = object_class_by_name(typename);
|
||||||
|
|
||||||
if (oc &&
|
if (oc && object_class_dynamic_cast(oc, TYPE_HPPA_CPU)) {
|
||||||
!object_class_is_abstract(oc) &&
|
|
||||||
object_class_dynamic_cast(oc, TYPE_HPPA_CPU)) {
|
|
||||||
return oc;
|
return oc;
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in New Issue