[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 10/10] rust: vmstate: make order of parameters consistent in vmst
From: |
Paolo Bonzini |
Subject: |
[PATCH 10/10] rust: vmstate: make order of parameters consistent in vmstate_clock |
Date: |
Fri, 17 Jan 2025 10:00:46 +0100 |
Place struct_name before field_name, similar to offset_of.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
rust/hw/char/pl011/src/device_class.rs | 2 +-
rust/qemu-api/src/vmstate.rs | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/rust/hw/char/pl011/src/device_class.rs
b/rust/hw/char/pl011/src/device_class.rs
index e0d3532e956..b052d98803f 100644
--- a/rust/hw/char/pl011/src/device_class.rs
+++ b/rust/hw/char/pl011/src/device_class.rs
@@ -27,7 +27,7 @@ extern "C" fn pl011_clock_needed(opaque: *mut c_void) -> bool
{
minimum_version_id: 1,
needed: Some(pl011_clock_needed),
fields: vmstate_fields! {
- vmstate_clock!(clock, PL011State),
+ vmstate_clock!(PL011State, clock),
},
..Zeroable::ZERO
};
diff --git a/rust/qemu-api/src/vmstate.rs b/rust/qemu-api/src/vmstate.rs
index 70dd3c4fc48..89ca643a58f 100644
--- a/rust/qemu-api/src/vmstate.rs
+++ b/rust/qemu-api/src/vmstate.rs
@@ -457,7 +457,7 @@ macro_rules! vmstate_struct {
#[doc(alias = "VMSTATE_CLOCK")]
#[macro_export]
macro_rules! vmstate_clock {
- ($field_name:ident, $struct_name:ty) => {{
+ ($struct_name:ty, $field_name:ident) => {{
$crate::bindings::VMStateField {
name: ::core::concat!(::core::stringify!($field_name), "\0")
.as_bytes()
--
2.47.1
- [PATCH 00/10] rust: (mostly) type safe VMState, Paolo Bonzini, 2025/01/17
- [PATCH 01/10] rust: vmstate: add new type safe implementation, Paolo Bonzini, 2025/01/17
- [PATCH 04/10] rust: vmstate: implement Zeroable for VMStateField, Paolo Bonzini, 2025/01/17
- [PATCH 05/10] rust: vmstate: implement VMState for scalar types, Paolo Bonzini, 2025/01/17
- [PATCH 03/10] rust: vmstate: add varray support to vmstate_of!, Paolo Bonzini, 2025/01/17
- [PATCH 07/10] rust: qemu_api: add vmstate_struct, Paolo Bonzini, 2025/01/17
- [PATCH 06/10] rust: vmstate: add public utility macros to implement VMState, Paolo Bonzini, 2025/01/17
- [PATCH 08/10] rust: pl011: switch vmstate to new-style macros, Paolo Bonzini, 2025/01/17
- [PATCH 10/10] rust: vmstate: make order of parameters consistent in vmstate_clock,
Paolo Bonzini <=
- [PATCH 09/10] rust: vmstate: remove translation of C vmstate macros, Paolo Bonzini, 2025/01/17
- [PATCH 02/10] rust: vmstate: implement VMState for non-leaf types, Paolo Bonzini, 2025/01/17