Skip to content

Commit 9cbe691

Browse files
SrinivasShekarSrinivasShekar
authored andcommitted
Addressed lint errors
1 parent 0ab1dc6 commit 9cbe691

File tree

1 file changed

+6
-6
lines changed
  • vm/devices/storage/disk_nvme/nvme_driver/src

1 file changed

+6
-6
lines changed

vm/devices/storage/disk_nvme/nvme_driver/src/driver.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ pub enum RestoreError {
106106
#[derive(Debug, Error)]
107107
pub enum DeviceError {
108108
#[error("no more io queues available, reached maximum {0}")]
109-
NoMoreIoQueues(usize),
109+
NoMoreIoQueues(u16),
110110
#[error("failed to map interrupt")]
111111
InterruptMapFailure(#[source] anyhow::Error),
112112
#[error("failed to create io queue pair {1}")]
@@ -894,15 +894,15 @@ impl<T: DeviceBacking> DriverWorkerTask<T> {
894894
fallback_cpu,
895895
error = &err as &dyn std::error::Error,
896896
"failed to create io queue, falling back"
897-
);
897+
);
898898
}
899899
_ => {
900-
tracing::error!(
900+
tracing::error!(
901901
cpu,
902902
fallback_cpu,
903903
error = &err as &dyn std::error::Error,
904904
"failed to create io queue, falling back"
905-
);
905+
);
906906
}
907907
}
908908

@@ -922,7 +922,7 @@ impl<T: DeviceBacking> DriverWorkerTask<T> {
922922
cpu: u32,
923923
) -> Result<IoIssuer, DeviceError> {
924924
if self.io.len() >= state.max_io_queues as usize {
925-
return Err(DeviceError::NoMoreIoQueues(state.max_io_queues as usize));
925+
return Err(DeviceError::NoMoreIoQueues(state.max_io_queues));
926926
}
927927

928928
let qid = self.io.len() as u16 + 1;
@@ -946,7 +946,7 @@ impl<T: DeviceBacking> DriverWorkerTask<T> {
946946
self.registers.clone(),
947947
self.bounce_buffer,
948948
)
949-
.map_err(|err| DeviceError::IoQueuePairCreationFailure(err.into(), qid))?;
949+
.map_err(|err| DeviceError::IoQueuePairCreationFailure(err, qid))?;
950950

951951
let io_sq_addr = queue.sq_addr();
952952
let io_cq_addr = queue.cq_addr();

0 commit comments

Comments
 (0)