Skip to content

Commit 9191a0c

Browse files
stefano-garzarellaepilys
authored andcommitted
chore: remove pub visibility from exit event fields
The `exit_consumer` and `exit_notifier` fields are only used internally by the exit_event() method implementation or by send_exit_event() in the sound device. So, they do not need to be exposed in the public API of backend structures. Signed-off-by: Stefano Garzarella <[email protected]>
1 parent 9040bcb commit 9191a0c

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

staging/vhost-device-video/src/vhu_video.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,8 @@ unsafe impl ByteValued for VirtioVideoConfig {}
127127
pub(crate) struct VuVideoBackend {
128128
config: VirtioVideoConfig,
129129
pub threads: Vec<Mutex<VhostUserVideoThread>>,
130-
pub exit_consumer: EventConsumer,
131-
pub exit_notifier: EventNotifier,
130+
exit_consumer: EventConsumer,
131+
exit_notifier: EventNotifier,
132132
}
133133

134134
impl VuVideoBackend {

vhost-device-console/src/vhu_console.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ pub struct VhostUserConsoleBackend {
141141
pub stream: Option<Box<dyn ReadWrite + Send + Sync>>,
142142
pub rx_event: EventFd,
143143
pub rx_ctrl_event: EventFd,
144-
pub exit_consumer: EventConsumer,
145-
pub exit_notifier: EventNotifier,
144+
exit_consumer: EventConsumer,
145+
exit_notifier: EventNotifier,
146146
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
147147
}
148148

vhost-device-gpio/src/vhu_gpio.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ pub(crate) struct VhostUserGpioBackend<D: GpioDevice> {
160160
controller: Arc<GpioController<D>>,
161161
handles: Arc<RwLock<Vec<Option<JoinHandle<()>>>>>,
162162
event_idx: bool,
163-
pub(crate) exit_consumer: EventConsumer,
164-
pub(crate) exit_notifier: EventNotifier,
163+
exit_consumer: EventConsumer,
164+
exit_notifier: EventNotifier,
165165
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
166166
}
167167

vhost-device-gpu/src/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,8 @@ struct VhostUserGpuBackendInner {
141141
virtio_cfg: VirtioGpuConfig,
142142
event_idx_enabled: bool,
143143
gpu_backend: Option<GpuBackend>,
144-
pub exit_consumer: EventConsumer,
145-
pub exit_notifier: EventNotifier,
144+
exit_consumer: EventConsumer,
145+
exit_notifier: EventNotifier,
146146
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
147147
gpu_config: GpuConfig,
148148
}

vhost-device-i2c/src/vhu_i2c.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,8 @@ unsafe impl ByteValued for VirtioI2cInHdr {}
105105
pub(crate) struct VhostUserI2cBackend<D: I2cDevice> {
106106
i2c_map: Arc<I2cMap<D>>,
107107
event_idx: bool,
108-
pub exit_consumer: EventConsumer,
109-
pub exit_notifier: EventNotifier,
108+
exit_consumer: EventConsumer,
109+
exit_notifier: EventNotifier,
110110
mem: Option<GuestMemoryLoadGuard<GuestMemoryMmap>>,
111111
}
112112

vhost-device-input/src/vhu_input.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ impl From<VuInputError> for io::Error {
124124
pub(crate) struct VuInputBackend<T: InputDevice> {
125125
event_idx: bool,
126126
ev_dev: T,
127-
pub exit_consumer: EventConsumer,
128-
pub exit_notifier: EventNotifier,
127+
exit_consumer: EventConsumer,
128+
exit_notifier: EventNotifier,
129129
select: u8,
130130
subsel: u8,
131131
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,

vhost-device-rng/src/vhu_rng.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ pub(crate) struct VuRngBackend<T: ReadVolatile> {
9090
event_idx: bool,
9191
timer: VuRngTimerConfig,
9292
rng_source: Arc<Mutex<T>>,
93-
pub exit_consumer: EventConsumer,
94-
pub exit_notifier: EventNotifier,
93+
exit_consumer: EventConsumer,
94+
exit_notifier: EventNotifier,
9595
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
9696
}
9797

vhost-device-scmi/src/vhu_scmi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ type ScmiDescriptorChain = DescriptorChain<GuestMemoryLoadGuard<GuestMemoryMmap<
9696

9797
pub struct VuScmiBackend {
9898
event_idx: bool,
99-
pub exit_consumer: EventConsumer,
100-
pub exit_notifier: EventNotifier,
99+
exit_consumer: EventConsumer,
100+
exit_notifier: EventNotifier,
101101
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
102102
/// Event vring and descriptors serve for asynchronous responses and
103103
/// notifications. They are obtained from the driver and we store them

vhost-device-scsi/src/vhu_scsi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ pub struct VhostUserScsiBackend {
3939
event_idx: bool,
4040
mem: Option<GuestMemoryAtomic<GuestMemoryMmap>>,
4141
targets: Vec<Box<dyn Target>>,
42-
pub exit_consumer: EventConsumer,
43-
pub exit_notifier: EventNotifier,
42+
exit_consumer: EventConsumer,
43+
exit_notifier: EventNotifier,
4444
}
4545

4646
impl Default for VhostUserScsiBackend {

vhost-device-sound/src/device.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -486,8 +486,8 @@ impl VhostUserSoundThread {
486486
pub struct VhostUserSoundBackend {
487487
pub threads: Vec<RwLock<VhostUserSoundThread>>,
488488
virtio_cfg: VirtioSoundConfig,
489-
pub exit_consumer: EventConsumer,
490-
pub exit_notifier: EventNotifier,
489+
exit_consumer: EventConsumer,
490+
exit_notifier: EventNotifier,
491491
audio_backend: RwLock<Box<dyn AudioBackend + Send + Sync>>,
492492
}
493493

0 commit comments

Comments
 (0)