Skip to content

Commit

Permalink
clippy: minor fixes in docs
Browse files Browse the repository at this point in the history
Signed-off-by: Sergio Lopez <[email protected]>
  • Loading branch information
slp committed Aug 9, 2024
1 parent c901b20 commit eb4c311
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 19 deletions.
4 changes: 2 additions & 2 deletions src/devices/src/virtio/mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ const MMIO_VERSION: u32 = 2;
///
/// 1. Mmio reads and writes must be sent to this device at what is referred to here as MMIO base.
/// 1. `Mmio::queue_evts` must be installed at `virtio::NOTIFY_REG_OFFSET` offset from the MMIO
/// base. Each event in the array must be signaled if the index is written at that offset.
/// base. Each event in the array must be signaled if the index is written at that offset.
/// 1. `Mmio::interrupt_evt` must signal an interrupt that the guest driver is listening to when it
/// is written to.
/// is written to.
///
/// Typically one page (4096 bytes) of MMIO address space is sufficient to handle this transport
/// and inner virtio device.
Expand Down
14 changes: 0 additions & 14 deletions src/devices/src/virtio/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,20 +136,6 @@ impl VirtqUsedElem {
}
}

#[cfg(any(test, feature = "test-utils"))]
#[allow(clippy::len_without_is_empty)]
impl VirtqUsedElem {
/// Get the index of the used descriptor chain.
pub fn id(&self) -> u32 {
self.id.into()
}

/// Get `length` field of the used ring entry.
pub fn len(&self) -> u32 {
self.len.into()
}
}

// SAFETY: This is safe because `VirtqUsedElem` contains only wrappers over POD types
// and all accesses through safe `vm-memory` API will validate any garbage that could be
// included in there.
Expand Down
1 change: 1 addition & 0 deletions src/devices/src/virtio/vsock/muxer_rxq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ impl MuxerRxQ {
/// A push will fail when:
/// - trying to push a connection key onto an out-of-sync, or full queue; or
/// - trying to push an RST onto a queue already full of RSTs.
///
/// RSTs take precedence over connections, because connections can always be queried for
/// pending RX data later. Aside from this queue, there is no other storage for RSTs, so
/// failing to push one means that we have to drop the packet.
Expand Down
1 change: 1 addition & 0 deletions src/devices/src/virtio/vsock/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
/// virtio queue:
/// - the packet header; and
/// - the packet data/buffer.
///
/// There is a 1:1 relation between descriptor chains and packets: the first (chain head) holds
/// the header, and an optional second descriptor holds the data. The second descriptor is only
/// present for data packets (VSOCK_OP_RW).
Expand Down
6 changes: 3 additions & 3 deletions src/utils/src/linux/epoll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,11 @@ impl Epoll {
/// # Arguments
///
/// * `max_events` is the maximum number of events that we want to be returned in
/// `events` buffer.
/// `events` buffer.
/// * `timeout` specifies for how long the `epoll_wait` system call will block
/// (measured in milliseconds).
/// (measured in milliseconds).
/// * `events` points to a memory area that will be used for storing the events
/// returned by `epoll_wait()` call.
/// returned by `epoll_wait()` call.
pub fn wait(
&self,
max_events: usize,
Expand Down

0 comments on commit eb4c311

Please sign in to comment.