diff --git a/pci/src/bus.rs b/pci/src/bus.rs index d5cfd659c..dee437bb0 100644 --- a/pci/src/bus.rs +++ b/pci/src/bus.rs @@ -145,7 +145,7 @@ impl PciBus { } } - #[allow(clippy::needless_pass_by_value)] + #[expect(clippy::needless_pass_by_value)] pub fn register_mapping( &self, dev: Arc, diff --git a/pci/src/configuration.rs b/pci/src/configuration.rs index dbbb1b9f1..9bd4bbbed 100644 --- a/pci/src/configuration.rs +++ b/pci/src/configuration.rs @@ -195,7 +195,6 @@ pub trait PciProgrammingInterface { /// Types of PCI capabilities. #[derive(PartialEq, Eq, Copy, Clone)] -#[allow(non_camel_case_types)] #[repr(u8)] pub enum PciCapabilityId { ListId = 0, @@ -532,7 +531,7 @@ pub enum Error { pub type Result = result::Result; impl PciConfiguration { - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub fn new( vendor_id: u16, device_id: u16, diff --git a/pci/src/vfio.rs b/pci/src/vfio.rs index 4be5bec62..b50d5d13f 100644 --- a/pci/src/vfio.rs +++ b/pci/src/vfio.rs @@ -615,8 +615,6 @@ impl VfioCommon { } } - // The `allocator` argument is unused on `aarch64` - #[allow(unused_variables)] pub(crate) fn allocate_bars( &mut self, allocator: &mut SystemAllocator, @@ -817,12 +815,9 @@ impl VfioCommon { bar_id += 1; } } - Ok(bars) } - // The `allocator` argument is unused on `aarch64` - #[allow(unused_variables)] pub(crate) fn free_bars( &mut self, allocator: &mut SystemAllocator, @@ -1493,7 +1488,7 @@ pub struct VfioPciDevice { impl VfioPciDevice { /// Constructs a new Vfio Pci device for the given Vfio device - #[allow(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments)] pub fn new( id: String, vm: Arc, @@ -1790,7 +1785,6 @@ impl VfioPciDevice { // Only needed if p2p_dma is enabled. if !self.iommu_attached && self.p2p_dma { // vfio_dma_map should be unsafe but isn't. - #[allow(unused_unsafe)] // SAFETY: MmapRegion invariants guarantee that // user_memory_region.mapping.addr() points to // user_memory_region.mapping.len() bytes of @@ -2037,7 +2031,6 @@ iova 0x{:x}, size 0x{:x}: {}, ", // Only needed if p2p_dma is enabled. if !self.iommu_attached && self.p2p_dma { // vfio_dma_map is unsound and ought to be marked as unsafe - #[allow(unused_unsafe)] // SAFETY: MmapRegion invariants guarantee that // host_addr points to len bytes of // valid memory that will only be unmapped with munmap(). @@ -2158,7 +2151,6 @@ impl ExternalDmaMapping for VfioDmaMapping,