[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/71] target/hppa: Remove object_class_is_abstract()
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 03/71] target/hppa: Remove object_class_is_abstract() |
Date: |
Fri, 5 Jan 2024 16:41:56 +0100 |
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 --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;
--
2.41.0
- [PULL 00/71] HW core patches for 2024-01-05, Philippe Mathieu-Daudé, 2024/01/05
- [PULL 01/71] meson: Allow building binary with no target-specific files in hw/, Philippe Mathieu-Daudé, 2024/01/05
- [PULL 02/71] target/alpha: Remove fallback to ev67 cpu class, Philippe Mathieu-Daudé, 2024/01/05
- [PULL 03/71] target/hppa: Remove object_class_is_abstract(),
Philippe Mathieu-Daudé <=
- [PULL 04/71] cpu: Call object_class_dynamic_cast() once in cpu_class_by_name(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 05/71] cpu: Add helper cpu_model_from_type(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 06/71] cpu: Add generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 07/71] target/alpha: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 08/71] target/arm: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 09/71] target/avr: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 10/71] target/cris: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 11/71] target/hexagon: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 12/71] target/hppa: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05
- [PULL 13/71] target/loongarch: Use generic cpu_list(), Philippe Mathieu-Daudé, 2024/01/05