Fix a couple of warnings

This commit is contained in:
bjorn3
2024-01-19 19:14:22 +01:00
parent cb9edcb7d6
commit 23d963361a
+1 -7
View File
@@ -4,7 +4,7 @@ use std::{fmt, fs, io, mem, ptr, slice};
use syscall::PAGE_SIZE;
use crate::pci::{CfgAccess, Pci, PciAddress, PciIter};
use crate::pci::{CfgAccess, Pci, PciAddress};
pub const MCFG_NAME: [u8; 4] = *b"MCFG";
@@ -164,9 +164,6 @@ impl Pcie {
| ((address.function() as usize) << 12)
| (offset as usize)
}
fn addr_offset_in_dwords(starting_bus: u8, address: PciAddress, offset: u16) -> usize {
Self::addr_offset_in_bytes(starting_bus, address, offset) / mem::size_of::<u32>()
}
unsafe fn with_pointer<T, F: FnOnce(Option<&mut u32>) -> T>(
&self,
address: PciAddress,
@@ -199,9 +196,6 @@ impl Pcie {
(offset as usize / mem::size_of::<u32>()) as isize,
)))
}
pub fn buses<'pcie>(&'pcie self) -> PciIter<'pcie> {
PciIter::new(self)
}
}
impl CfgAccess for Pcie {