summary refs log tree commit diff
path: root/devices/src/virtio
diff options
context:
space:
mode:
Diffstat (limited to 'devices/src/virtio')
-rw-r--r--devices/src/virtio/gpu/backend.rs3
-rw-r--r--devices/src/virtio/gpu/mod.rs2
-rw-r--r--devices/src/virtio/input/event_source.rs6
-rw-r--r--devices/src/virtio/virtio_pci_device.rs2
4 files changed, 6 insertions, 7 deletions
diff --git a/devices/src/virtio/gpu/backend.rs b/devices/src/virtio/gpu/backend.rs
index 8d4d406..8dd6abf 100644
--- a/devices/src/virtio/gpu/backend.rs
+++ b/devices/src/virtio/gpu/backend.rs
@@ -807,8 +807,7 @@ impl Backend {
                                     offset: buffer.plane_offset(plane_index),
                                 });
                             }
-                            let mut backed =
-                                BackedBuffer::new_renderer_registered(buffer, res, image);
+                            let backed = BackedBuffer::new_renderer_registered(buffer, res, image);
                             slot.insert(Box::new(backed));
                             GpuResponse::OkResourcePlaneInfo {
                                 format_modifier,
diff --git a/devices/src/virtio/gpu/mod.rs b/devices/src/virtio/gpu/mod.rs
index c56b360..736314f 100644
--- a/devices/src/virtio/gpu/mod.rs
+++ b/devices/src/virtio/gpu/mod.rs
@@ -36,7 +36,7 @@ use super::{
 
 use self::backend::Backend;
 use self::protocol::*;
-use pci::{PciBarConfiguration, PciBarPrefetchable, PciBarRegionType};
+use crate::pci::{PciBarConfiguration, PciBarPrefetchable, PciBarRegionType};
 
 // First queue is for virtio gpu commands. Second queue is for cursor commands, which we expect
 // there to be fewer of.
diff --git a/devices/src/virtio/input/event_source.rs b/devices/src/virtio/input/event_source.rs
index 5e24f08..48ed192 100644
--- a/devices/src/virtio/input/event_source.rs
+++ b/devices/src/virtio/input/event_source.rs
@@ -335,14 +335,14 @@ where
 
 #[cfg(test)]
 mod tests {
+    use crate::virtio::input::event_source::input_event;
+    use crate::virtio::input::event_source::EventSourceImpl;
+    use crate::virtio::input::virtio_input_event;
     use data_model::{DataInit, Le16, Le32};
     use std::cmp::min;
     use std::io::Read;
     use std::io::Write;
     use std::mem::size_of;
-    use virtio::input::event_source::input_event;
-    use virtio::input::event_source::EventSourceImpl;
-    use virtio::input::virtio_input_event;
 
     struct SourceMock {
         events: Vec<u8>,
diff --git a/devices/src/virtio/virtio_pci_device.rs b/devices/src/virtio/virtio_pci_device.rs
index 27ab5fb..7c5b0d8 100644
--- a/devices/src/virtio/virtio_pci_device.rs
+++ b/devices/src/virtio/virtio_pci_device.rs
@@ -354,7 +354,7 @@ impl PciDevice for VirtioPciDevice {
         resources: &mut SystemAllocator,
     ) -> std::result::Result<Vec<(u64, u64)>, PciDeviceError> {
         let mut ranges = Vec::new();
-        for mut config in self.device.get_device_bars() {
+        for config in self.device.get_device_bars() {
             let device_addr = resources
                 .allocate_device_addresses(config.get_size())
                 .ok_or(PciDeviceError::IoAllocationFailed(config.get_size()))?;