rust: vmstate: make order of parameters consistent in vmstate_clock

Place struct_name before field_name, similar to offset_of.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Paolo Bonzini 2025-01-07 10:30:41 +01:00
parent 9d4899496b
commit 24f0e8d818
2 changed files with 2 additions and 2 deletions

View file

@ -27,7 +27,7 @@ pub static VMSTATE_PL011_CLOCK: VMStateDescription = VMStateDescription {
minimum_version_id: 1, minimum_version_id: 1,
needed: Some(pl011_clock_needed), needed: Some(pl011_clock_needed),
fields: vmstate_fields! { fields: vmstate_fields! {
vmstate_clock!(clock, PL011State), vmstate_clock!(PL011State, clock),
}, },
..Zeroable::ZERO ..Zeroable::ZERO
}; };

View file

@ -457,7 +457,7 @@ macro_rules! vmstate_struct {
#[doc(alias = "VMSTATE_CLOCK")] #[doc(alias = "VMSTATE_CLOCK")]
#[macro_export] #[macro_export]
macro_rules! vmstate_clock { macro_rules! vmstate_clock {
($field_name:ident, $struct_name:ty) => {{ ($struct_name:ty, $field_name:ident) => {{
$crate::bindings::VMStateField { $crate::bindings::VMStateField {
name: ::core::concat!(::core::stringify!($field_name), "\0") name: ::core::concat!(::core::stringify!($field_name), "\0")
.as_bytes() .as_bytes()