diff --git a/src/devices/src/virtio/vsock/unix/muxer.rs b/src/devices/src/virtio/vsock/unix/muxer.rs index eba484a75cb..612ccb20c04 100644 --- a/src/devices/src/virtio/vsock/unix/muxer.rs +++ b/src/devices/src/virtio/vsock/unix/muxer.rs @@ -273,7 +273,7 @@ impl VsockEpollListener for VsockMuxer { /// Get the epoll events to be polled upstream. /// /// Since the polled FD is a nested epoll FD, we're only interested in EPOLLIN events (i.e. - /// some event occured on one of the FDs registered under our epoll FD). + /// some event occurred on one of the FDs registered under our epoll FD). fn get_polled_evset(&self) -> EventSet { EventSet::IN } @@ -327,30 +327,29 @@ impl VsockMuxer { local_port_set: HashSet::with_capacity(defs::MAX_CONNECTIONS), }; - // Listen on the host initiated socket, for incomming connections. + // Listen on the host initiated socket, for incoming connections. muxer.add_listener(muxer.host_sock.as_raw_fd(), EpollListener::HostSock)?; Ok(muxer) } /// Handle/dispatch an epoll event to its listener. - fn handle_event(&mut self, fd: RawFd, evset: EventSet) { + fn handle_event(&mut self, fd: RawFd, event_set: EventSet) { debug!( "vsock: muxer processing event: fd={}, evset={:?}", - fd, evset + fd, event_set ); match self.listener_map.get_mut(&fd) { // This event needs to be forwarded to a `MuxerConnection` that is listening for // it. - Some(EpollListener::Connection { key, evset }) => { + Some(EpollListener::Connection { key, evset: _ }) => { let key_copy = *key; - let evset_copy = *evset; // The handling of this event will most probably mutate the state of the - // receiving conection. We'll need to check for new pending RX, event set + // receiving connection. We'll need to check for new pending RX, event set // mutation, and all that, so we're wrapping the event delivery inside those // checks. self.apply_conn_mutation(key_copy, |conn| { - conn.notify(evset_copy); + conn.notify(event_set); }); } @@ -412,7 +411,10 @@ impl VsockMuxer { } _ => { - info!("vsock: unexpected event: fd={:?}, evset={:?}", fd, evset); + info!( + "vsock: unexpected event: fd={:?}, evset={:?}", + fd, event_set + ); METRICS.vsock.muxer_event_fails.inc(); } }