rust: vmstate: make order of parameters consistent in vmstate_clock
authorPaolo Bonzini <pbonzini@redhat.com>
Tue, 7 Jan 2025 09:30:41 +0000 (10:30 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 23 Jan 2025 10:50:53 +0000 (11:50 +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
rust/qemu-api/src/vmstate.rs

index e0d3532e9569570042168d8e51250a1acd961c59..b052d98803f46ee0bad0a8c6fee6bde2380399e3 100644 (file)
@@ -27,7 +27,7 @@ pub static VMSTATE_PL011_CLOCK: VMStateDescription = VMStateDescription {
     minimum_version_id: 1,
     needed: Some(pl011_clock_needed),
     fields: vmstate_fields! {
-        vmstate_clock!(clock, PL011State),
+        vmstate_clock!(PL011State, clock),
     },
     ..Zeroable::ZERO
 };
index 120933e60da69e62e0b4df93c611f95959026cc8..6ac432cf52f2f5f1fe2c2a9974f89a1fc174ba25 100644 (file)
@@ -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()