Skip to content

Commit f7b87e4

Browse files
trueptolemybonzini
authored andcommitted
rust/vmstate: Include complete crate path of VMStateFlags in vmstate_clock
The use of "bindings::*" masks incomplete path of VMStateFlags. Include complete crate path of VMStateFlags in vmstate_clock, and clean up "bindings::*" in device_class.rs of pl011. Signed-off-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 9bd7e6f commit f7b87e4

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

rust/hw/char/pl011/src/device_class.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,12 @@ use std::{
88
};
99

1010
use qemu_api::{
11-
bindings::*, c_str, prelude::*, vmstate_clock, vmstate_fields, vmstate_of, vmstate_struct,
12-
vmstate_subsections, vmstate_unused, zeroable::Zeroable,
11+
bindings::{qdev_prop_bool, qdev_prop_chr},
12+
c_str,
13+
prelude::*,
14+
vmstate::VMStateDescription,
15+
vmstate_clock, vmstate_fields, vmstate_of, vmstate_struct, vmstate_subsections, vmstate_unused,
16+
zeroable::Zeroable,
1317
};
1418

1519
use crate::device::{PL011Registers, PL011State};

rust/qemu-api/src/vmstate.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,10 @@ macro_rules! vmstate_clock {
487487
$crate::offset_of!($struct_name, $field_name)
488488
},
489489
size: ::core::mem::size_of::<*const $crate::qdev::Clock>(),
490-
flags: VMStateFlags(VMStateFlags::VMS_STRUCT.0 | VMStateFlags::VMS_POINTER.0),
490+
flags: $crate::bindings::VMStateFlags(
491+
$crate::bindings::VMStateFlags::VMS_STRUCT.0
492+
| $crate::bindings::VMStateFlags::VMS_POINTER.0,
493+
),
491494
vmsd: unsafe { ::core::ptr::addr_of!($crate::bindings::vmstate_clock) },
492495
..$crate::zeroable::Zeroable::ZERO
493496
}

0 commit comments

Comments
 (0)