[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 02/10] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque'
From: |
Philippe Mathieu-Daudé |
Subject: |
[RFC PATCH 02/10] hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque' |
Date: |
Thu, 19 Dec 2024 16:38:49 +0100 |
Both QEMUResetHandler and FWCfgWriteCallback take an opaque
pointer argument, no need to cast.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
hw/misc/vmcoreinfo.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c
index 84b211e9117..ad5a4dec596 100644
--- a/hw/misc/vmcoreinfo.c
+++ b/hw/misc/vmcoreinfo.c
@@ -18,17 +18,17 @@
#include "migration/vmstate.h"
#include "hw/misc/vmcoreinfo.h"
-static void fw_cfg_vmci_write(void *dev, off_t offset, size_t len)
+static void fw_cfg_vmci_write(void *opaque, off_t offset, size_t len)
{
- VMCoreInfoState *s = VMCOREINFO(dev);
+ VMCoreInfoState *s = opaque;
s->has_vmcoreinfo = offset == 0 && len == sizeof(s->vmcoreinfo)
&& s->vmcoreinfo.guest_format != FW_CFG_VMCOREINFO_FORMAT_NONE;
}
-static void vmcoreinfo_reset(void *dev)
+static void vmcoreinfo_reset(void *opaque)
{
- VMCoreInfoState *s = VMCOREINFO(dev);
+ VMCoreInfoState *s = opaque;
s->has_vmcoreinfo = false;
memset(&s->vmcoreinfo, 0, sizeof(s->vmcoreinfo));
@@ -65,7 +65,7 @@ static void vmcoreinfo_realize(DeviceState *dev, Error **errp)
* This device requires to register a global reset because it is
* not plugged to a bus (which, as its QOM parent, would reset it).
*/
- qemu_register_reset(vmcoreinfo_reset, dev);
+ qemu_register_reset(vmcoreinfo_reset, s);
vmcoreinfo_state = s;
}
--
2.47.1
- Re: [RFC PATCH 03/10] hw/misc/vmcoreinfo: Un-inline vmcoreinfo_find(), (continued)
- [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é, 2024/12/19
- [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é <=
- [RFC PATCH 08/10] hw/misc/vmcoreinfo: Implement 'vmcore-info' object, Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH-for-10.2 10/10] hw/misc/vmcoreinfo: Remove legacy '-device vmcoreinfo', Philippe Mathieu-Daudé, 2024/12/19
- [RFC PATCH 06/10] hw/misc/vmcoreinfo: Move vmstate_vmcoreinfo[] around, Philippe Mathieu-Daudé, 2024/12/19
- Re: [RFC PATCH 00/10] hw/misc/vmcoreinfo: Convert from QDev to plain Object, Daniel P . Berrangé, 2024/12/19