@@ -10,10 +10,10 @@ use memory_addresses::VirtAddr;
1010use pci_types:: InterruptLine ;
1111use vroom:: { Dma , IoQueuePair , IoQueuePairId , Namespace , NamespaceId , NvmeDevice } ;
1212
13- use crate :: arch:: mm:: paging:: { virtual_to_physical , BasePageSize , PageSize } ;
13+ use crate :: arch:: mm:: paging:: { BasePageSize , PageSize , virtual_to_physical } ;
1414use crate :: arch:: pci:: PciConfigRegion ;
15- use crate :: drivers:: pci:: PciDevice ;
1615use crate :: drivers:: Driver ;
16+ use crate :: drivers:: pci:: PciDevice ;
1717use crate :: mm:: device_alloc:: DeviceAlloc ;
1818use crate :: syscalls:: nvme:: SysNvmeError ;
1919
@@ -264,7 +264,7 @@ impl vroom::Allocator for NvmeAllocator {
264264 ) -> Result < * mut [ T ] , Box < dyn core:: error:: Error > > {
265265 debug ! ( "NVMe driver: allocate size {:#x}" , layout. size( ) ) ;
266266 let Ok ( memory) = self . device_allocator . allocate ( layout) else {
267- return Err ( "NVMe driver: Could not allocate memory with device allocator." . into ( ) ) ;
267+ return Err ( "NVMe driver: Could not allocate memory with device allocator." . into ( ) ) ;
268268 } ;
269269 self . allocations
270270 . lock ( )
@@ -301,10 +301,10 @@ impl vroom::Allocator for NvmeAllocator {
301301 debug ! ( "NVMe driver: translate virtual address {address:#x}" ) ;
302302 let virtual_address: VirtAddr = VirtAddr :: new ( address as u64 ) ;
303303 let Some ( physical_address) = virtual_to_physical ( virtual_address) else {
304- return Err (
305- "NVMe driver: The given virtual address could not be mapped to a physical one."
306- . into ( ) ,
307- ) ;
304+ return Err (
305+ "NVMe driver: The given virtual address could not be mapped to a physical one."
306+ . into ( ) ,
307+ ) ;
308308 } ;
309309 Ok ( physical_address. as_usize ( ) as * mut T )
310310 }
0 commit comments