diff mbox series

[PULL,03/71] target/hppa: Remove object_class_is_abstract()

Message ID 20240105154307.21385-4-philmd@linaro.org
State Accepted
Commit b0b8fa181472a7e745cb0c2c33b5c84dbb3b34ef
Headers show
Series [PULL,01/71] meson: Allow building binary with no target-specific files in hw/ | expand

Commit Message

Philippe Mathieu-Daudé Jan. 5, 2024, 3:41 p.m. UTC
From: Gavin Shan <gshan@redhat.com>

Since commit 3a9d0d7b64 ("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 commit 3a9d0d7b64]
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/hppa/cpu.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c
index 04de1689d7..e3e7200b1d 100644
--- a/target/hppa/cpu.c
+++ b/target/hppa/cpu.c
@@ -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);
     ObjectClass *oc = object_class_by_name(typename);
 
-    if (oc &&
-        !object_class_is_abstract(oc) &&
-        object_class_dynamic_cast(oc, TYPE_HPPA_CPU)) {
+    if (oc && object_class_dynamic_cast(oc, TYPE_HPPA_CPU)) {
         return oc;
     }
     return NULL;