devices: trim qualified paths

Import the modules used in the crate instead of spelling the
fully-qualified paths at every use site, and collapse Result<T,
io::Error> into io::Result<T>. This covers the feature-gated modules
(fw_cfg, ivshmem, pvmemcontrol) as well, leaving the whole crate free
of clippy::absolute_paths warnings.

Signed-off-by: Henry Hrvoje Tonkovac <htonkovac@gmail.com>
Assisted-by: Claude:Opus-4.8
This commit is contained in:
Henry Hrvoje Tonkovac
2026-06-11 12:09:05 +02:00
committed by Rob Bradford
parent 9eff92fb4b
commit 181d29ee90
14 changed files with 79 additions and 69 deletions
+2 -1
View File
@@ -4,6 +4,7 @@
//
use std::cmp;
use std::ops::Range;
use std::path::Path;
use std::sync::{Arc, Barrier};
@@ -252,7 +253,7 @@ fn complete_request(regs: &mut [u32; TPM_CRB_R_MAX], success: bool) {
}
}
fn data_buffer_range(offset: u32, len: usize, buffer_len: usize) -> Option<std::ops::Range<usize>> {
fn data_buffer_range(offset: u32, len: usize, buffer_len: usize) -> Option<Range<usize>> {
let end_offset = offset.checked_add(len as u32)?;
let buffer_end = CRB_DATA_BUFFER.checked_add(buffer_len as u32)?;