virtio-devices: balloon: Fix typo, comment, and dead variants

Fix "Fail tp signal" typo, replace copy-pasted "entropy" comment
with "balloon", and remove EventFdWriteFail and QueueIterator error
variants that have no call sites.

Signed-off-by: Rob Bradford <rbradford@meta.com>
Assisted-by: Claude:claude-opus-4-6
This commit is contained in:
Rob Bradford
2026-05-06 13:49:57 +01:00
parent 5702e9751c
commit 7c8ee401d5

View File

@@ -77,18 +77,14 @@ pub enum Error {
FallocateFail(#[source] std::io::Error),
#[error("Madvise fail.")]
MadviseFail(#[source] std::io::Error),
#[error("Failed to EventFd write.")]
EventFdWriteFail(#[source] std::io::Error),
#[error("Invalid queue index: {0}")]
InvalidQueueIndex(usize),
#[error("Fail tp signal")]
#[error("Failed to signal")]
FailedSignal(#[source] io::Error),
#[error("Descriptor chain is too short")]
DescriptorChainTooShort,
#[error("Failed adding used index")]
QueueAddUsed(#[source] virtio_queue::Error),
#[error("Failed creating an iterator over the queue")]
QueueIterator(#[source] virtio_queue::Error),
}
// Got from include/uapi/linux/virtio_balloon.h
@@ -451,7 +447,7 @@ pub struct BalloonState {
pub config: VirtioBalloonConfig,
}
// Virtio device for exposing entropy to the guest OS through virtio.
// Virtio device for managing guest memory through a balloon.
pub struct Balloon {
common: VirtioCommon,
id: String,