diff options
author | Gavin Shan <gshan@redhat.com> | 2023-11-15 09:55:59 +1000 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-05 16:20:14 +0100 |
commit | b0b8fa181472a7e745cb0c2c33b5c84dbb3b34ef (patch) | |
tree | 1d7e6e9fbbd2a668a68573322bdf244871e162b4 /target/hppa | |
parent | 9c115f68e2d27a7aea71e4956689a091fad1ba64 (diff) | |
download | qemu-b0b8fa181472a7e745cb0c2c33b5c84dbb3b34ef.zip qemu-b0b8fa181472a7e745cb0c2c33b5c84dbb3b34ef.tar.gz qemu-b0b8fa181472a7e745cb0c2c33b5c84dbb3b34ef.tar.bz2 |
target/hppa: Remove object_class_is_abstract()
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>
Diffstat (limited to 'target/hppa')
-rw-r--r-- | target/hppa/cpu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 04de168..e3e7200 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; |