[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 04/19] hw/intc/loongson_ipi: Extract loongson_ipi_common_final
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH v5 04/19] hw/intc/loongson_ipi: Extract loongson_ipi_common_finalize() |
Date: |
Thu, 18 Jul 2024 15:32:56 +0200 |
From: Bibo Mao <maobibo@loongson.cn>
In preparation to extract common IPI code in few commits,
extract loongson_ipi_common_finalize().
Signed-off-by: Bibo Mao <maobibo@loongson.cn>
[PMD: Extracted from bigger commit, added commit description]
Co-Developed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Tested-by: Bibo Mao <maobibo@loongson.cn>
Acked-by: Song Gao <gaosong@loongson.cn>
---
hw/intc/loongson_ipi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/intc/loongson_ipi.c b/hw/intc/loongson_ipi.c
index d870af39c1..960d1e604f 100644
--- a/hw/intc/loongson_ipi.c
+++ b/hw/intc/loongson_ipi.c
@@ -357,13 +357,18 @@ static void loongson_ipi_class_init(ObjectClass *klass,
void *data)
dc->vmsd = &vmstate_loongson_ipi;
}
-static void loongson_ipi_finalize(Object *obj)
+static void loongson_ipi_common_finalize(Object *obj)
{
LoongsonIPIState *s = LOONGSON_IPI(obj);
g_free(s->cpu);
}
+static void loongson_ipi_finalize(Object *obj)
+{
+ loongson_ipi_common_finalize(obj);
+}
+
static const TypeInfo loongson_ipi_types[] = {
{
.name = TYPE_LOONGSON_IPI,
--
2.41.0
- [PATCH v5 00/19] Reconstruct loongson ipi driver, Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 05/19] hw/intc/loongson_ipi: Extract loongson_ipi_common_realize(), Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 06/19] hw/intc/loongson_ipi: Add TYPE_LOONGSON_IPI_COMMON stub, Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 07/19] hw/intc/loongson_ipi: Move common definitions to loongson_ipi_common.h, Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 08/19] hw/intc/loongson_ipi: Move IPICore::mmio_mem to LoongsonIPIState, Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 09/19] hw/intc/loongson_ipi: Move IPICore structure to loongson_ipi_common.h, Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 10/19] hw/intc/loongson_ipi: Pass LoongsonIPICommonState to send_ipi_data(), Philippe Mathieu-Daudé, 2024/07/18
- [PATCH v5 11/19] hw/intc/loongson_ipi: Add LoongsonIPICommonClass::get_iocsr_as handler, Philippe Mathieu-Daudé, 2024/07/18