summary refs log tree commit diff
path: root/vfio_sys
diff options
context:
space:
mode:
authorDaniel Verkamp <dverkamp@chromium.org>2019-09-24 11:06:58 -0700
committerCommit Bot <commit-bot@chromium.org>2019-10-17 00:17:05 +0000
commit04a82c7be173b2068c4254ed4a129e24e9e3a2e4 (patch)
tree253fdffb4299b8ed379cec420c54b81c8b0d5865 /vfio_sys
parenta7b75c8a219eb98e49d995ea58e33e1832533e1b (diff)
downloadcrosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.tar
crosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.tar.gz
crosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.tar.bz2
crosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.tar.lz
crosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.tar.xz
crosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.tar.zst
crosvm-04a82c7be173b2068c4254ed4a129e24e9e3a2e4.zip
devices: vfio: fix clippy warnings
Fix boxed_local, const_static_lifetime, useless_format, and
redundant_closure clippy warnings in the VFIO code.

This fixes all clippy warnings except a single instance of
let_and_return in VfioPciDevice::keep_fds(), since that code is modified
in an upcoming patch.

BUG=None
TEST=./build_test.py
TEST=bin/clippy

Change-Id: I548adbc6b92448fc0db82ed72214d73b0eabaf5c
Signed-off-by: Daniel Verkamp <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1822697
Reviewed-by: Xiong  Zhang <xiong.y.zhang@intel.corp-partner.google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
Tested-by: Xiong  Zhang <xiong.y.zhang@intel.corp-partner.google.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Diffstat (limited to 'vfio_sys')
-rw-r--r--vfio_sys/src/vfio.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/vfio_sys/src/vfio.rs b/vfio_sys/src/vfio.rs
index 45b4cc9..3b88848 100644
--- a/vfio_sys/src/vfio.rs
+++ b/vfio_sys/src/vfio.rs
@@ -81,10 +81,10 @@ pub const VFIO_DEVICE_FLAGS_PCI: u32 = 2;
 pub const VFIO_DEVICE_FLAGS_PLATFORM: u32 = 4;
 pub const VFIO_DEVICE_FLAGS_AMBA: u32 = 8;
 pub const VFIO_DEVICE_FLAGS_CCW: u32 = 16;
-pub const VFIO_DEVICE_API_PCI_STRING: &'static [u8; 9usize] = b"vfio-pci\0";
-pub const VFIO_DEVICE_API_PLATFORM_STRING: &'static [u8; 14usize] = b"vfio-platform\0";
-pub const VFIO_DEVICE_API_AMBA_STRING: &'static [u8; 10usize] = b"vfio-amba\0";
-pub const VFIO_DEVICE_API_CCW_STRING: &'static [u8; 9usize] = b"vfio-ccw\0";
+pub const VFIO_DEVICE_API_PCI_STRING: &[u8; 9usize] = b"vfio-pci\0";
+pub const VFIO_DEVICE_API_PLATFORM_STRING: &[u8; 14usize] = b"vfio-platform\0";
+pub const VFIO_DEVICE_API_AMBA_STRING: &[u8; 10usize] = b"vfio-amba\0";
+pub const VFIO_DEVICE_API_CCW_STRING: &[u8; 9usize] = b"vfio-ccw\0";
 pub const VFIO_REGION_INFO_FLAG_READ: u32 = 1;
 pub const VFIO_REGION_INFO_FLAG_WRITE: u32 = 2;
 pub const VFIO_REGION_INFO_FLAG_MMAP: u32 = 4;