diff options
author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-12-19 14:46:11 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-12-31 21:21:34 +0100 |
commit | 924e1be17571968f81ef0bde87729678c201df21 (patch) | |
tree | 6075e2a1871a4eba1b6f345dc95cac3ded96f77e | |
parent | 3154922c7fb8a62ebdcf7fe65e11cd4115207150 (diff) | |
download | qemu-924e1be17571968f81ef0bde87729678c201df21.zip qemu-924e1be17571968f81ef0bde87729678c201df21.tar.gz qemu-924e1be17571968f81ef0bde87729678c201df21.tar.bz2 |
hw/misc/vmcoreinfo: Rename opaque pointer as 'opaque'
Both QEMUResetHandler and FWCfgWriteCallback take an opaque
pointer argument, no need to cast.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Message-Id: <20241219153857.57450-3-philmd@linaro.org>
-rw-r--r-- | hw/misc/vmcoreinfo.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/hw/misc/vmcoreinfo.c b/hw/misc/vmcoreinfo.c index 31073c8..b1fcc22 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; } |