[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 04/10] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_V
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 04/10] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO_DEVICE |
Date: |
Thu, 19 Dec 2024 16:38:51 +0100 |
Follow the assumed QOM type definition style, prefixing with 'TYPE_'.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
include/hw/misc/vmcoreinfo.h | 6 +++---
hw/misc/vmcoreinfo.c | 8 ++++----
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/include/hw/misc/vmcoreinfo.h b/include/hw/misc/vmcoreinfo.h
index da1066d540c..122c69686b0 100644
--- a/include/hw/misc/vmcoreinfo.h
+++ b/include/hw/misc/vmcoreinfo.h
@@ -16,10 +16,10 @@
#include "standard-headers/linux/qemu_fw_cfg.h"
#include "qom/object.h"
-#define VMCOREINFO_DEVICE "vmcoreinfo"
+#define TYPE_VMCOREINFO_DEVICE "vmcoreinfo"
typedef struct VMCoreInfoState VMCoreInfoState;
-DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO,
- VMCOREINFO_DEVICE)
+DECLARE_INSTANCE_CHECKER(VMCoreInfoState, VMCOREINFO_DEVICE,
+ TYPE_VMCOREINFO_DEVICE)
typedef struct fw_cfg_vmcoreinfo FWCfgVMCoreInfo;
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c
index c5bb5c9fa52..9822615cfed 100644
--- a/hw/misc/vmcoreinfo.c
+++ b/hw/misc/vmcoreinfo.c
@@ -37,7 +37,7 @@ static void vmcoreinfo_reset(void *opaque)
static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
{
- VMCoreInfoState *s = VMCOREINFO(dev);
+ VMCoreInfoState *s = VMCOREINFO_DEVICE(dev);
FWCfgState *fw_cfg = fw_cfg_find();
/* for gdb script dump-guest-memory.py */
static VMCoreInfoState * volatile vmcoreinfo_state G_GNUC_UNUSED;
@@ -48,13 +48,13 @@ static void vmcoreinfo_realize(DeviceState *dev, Error
**errp)
*/
if (!vmcoreinfo_find()) {
error_setg(errp, "at most one %s instance is permitted",
- VMCOREINFO_DEVICE);
+ TYPE_VMCOREINFO_DEVICE);
return;
}
if (!fw_cfg || !fw_cfg->dma_enabled) {
error_setg(errp, "%s device requires fw_cfg with DMA",
- VMCOREINFO_DEVICE);
+ TYPE_VMCOREINFO_DEVICE);
return;
}
@@ -96,7 +96,7 @@ static void vmcoreinfo_device_class_init(ObjectClass *klass,
void *data)
static const TypeInfo vmcoreinfo_types[] = {
{
- .name = VMCOREINFO_DEVICE,
+ .name = TYPE_VMCOREINFO_DEVICE,
.parent = TYPE_DEVICE,
.instance_size = sizeof(VMCoreInfoState),
.class_init = vmcoreinfo_device_class_init,
--
2.47.1
- [RFC PATCH 00/10] hw/misc/vmcoreinfo: Convert from QDev to plain Object, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 03/10] hw/misc/vmcoreinfo: Un-inline vmcoreinfo_find(), Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 01/10] hw/misc/vmcoreinfo: Declare QOM type using DEFINE_TYPES macro, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 04/10] hw/misc/vmcoreinfo: Rename VMCOREINFO_DEVICE -> TYPE_VMCOREINFO_DEVICE,
Philippe Mathieu-Daudé <=
- [RFC PATCH 09/10] hw/misc/vmcoreinfo: Deprecate '-device vmcoreinfo', Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 05/10] hw/misc/vmcoreinfo: Convert to three-phase reset interface, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 07/10] hw/misc/vmcoreinfo: Factor vmcoreinfo_device_realize() out, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 02/10] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque', Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 08/10] hw/misc/vmcoreinfo: Implement 'vmcore-info' object, Philippe Mathieu-Daudé, 2024/12/19