mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-23 06:05:21 +00:00
vhost_user_backend: Fix clippy issues
Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
This commit is contained in:
parent
db151819f1
commit
9ff42060e0
@ -74,7 +74,7 @@ pub trait VhostUserBackend: Send + Sync + 'static {
|
|||||||
&mut self,
|
&mut self,
|
||||||
device_event: u16,
|
device_event: u16,
|
||||||
evset: epoll::Events,
|
evset: epoll::Events,
|
||||||
vrings: &Vec<Arc<RwLock<Vring>>>,
|
vrings: &[Arc<RwLock<Vring>>],
|
||||||
) -> result::Result<bool, io::Error>;
|
) -> result::Result<bool, io::Error>;
|
||||||
|
|
||||||
/// Get virtio device configuration.
|
/// Get virtio device configuration.
|
||||||
@ -625,7 +625,7 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandler for VhostUserHandler<S> {
|
|||||||
self.vrings[index as usize].write().unwrap().queue.ready = false;
|
self.vrings[index as usize].write().unwrap().queue.ready = false;
|
||||||
if let Some(fd) = self.vrings[index as usize].read().unwrap().kick.as_ref() {
|
if let Some(fd) = self.vrings[index as usize].read().unwrap().kick.as_ref() {
|
||||||
self.worker
|
self.worker
|
||||||
.unregister_listener(fd.as_raw_fd(), epoll::Events::EPOLLIN, index as u64)
|
.unregister_listener(fd.as_raw_fd(), epoll::Events::EPOLLIN, u64::from(index))
|
||||||
.map_err(VhostUserError::ReqHandlerError)?;
|
.map_err(VhostUserError::ReqHandlerError)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -659,7 +659,7 @@ impl<S: VhostUserBackend> VhostUserSlaveReqHandler for VhostUserHandler<S> {
|
|||||||
self.vrings[index as usize].write().unwrap().queue.ready = true;
|
self.vrings[index as usize].write().unwrap().queue.ready = true;
|
||||||
if let Some(fd) = self.vrings[index as usize].read().unwrap().kick.as_ref() {
|
if let Some(fd) = self.vrings[index as usize].read().unwrap().kick.as_ref() {
|
||||||
self.worker
|
self.worker
|
||||||
.register_listener(fd.as_raw_fd(), epoll::Events::EPOLLIN, index as u64)
|
.register_listener(fd.as_raw_fd(), epoll::Events::EPOLLIN, u64::from(index))
|
||||||
.map_err(VhostUserError::ReqHandlerError)?;
|
.map_err(VhostUserError::ReqHandlerError)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user