From 2a9e620f9a8330ab63f6445556a82b17e783f0e4 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Fri, 1 Nov 2019 15:25:40 -0700 Subject: [PATCH] devices: virtio: remove unused VirtioPciDevice functions The queue_evts() and interrupt_evt() functions were public, but nothing was calling them. Remove them to clean up the unused code. BUG=None TEST=./build_test Change-Id: Id36e78343869746c733bba04383ab93c9d377601 Signed-off-by: Daniel Verkamp Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1898270 Tested-by: kokoro Reviewed-by: Zach Reizner --- devices/src/virtio/virtio_pci_device.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/devices/src/virtio/virtio_pci_device.rs b/devices/src/virtio/virtio_pci_device.rs index b79a98a3a9..d31821e9fd 100644 --- a/devices/src/virtio/virtio_pci_device.rs +++ b/devices/src/virtio/virtio_pci_device.rs @@ -238,18 +238,6 @@ impl VirtioPciDevice { }) } - /// Gets the list of queue events that must be triggered whenever the VM writes to - /// `virtio::NOTIFY_REG_OFFSET` past the MMIO base. Each event must be triggered when the - /// value being written equals the index of the event in this list. - pub fn queue_evts(&self) -> &[EventFd] { - self.queue_evts.as_slice() - } - - /// Gets the event this device uses to interrupt the VM when the used queue is changed. - pub fn interrupt_evt(&self) -> Option<&EventFd> { - self.interrupt_evt.as_ref() - } - fn is_driver_ready(&self) -> bool { let ready_bits = (DEVICE_ACKNOWLEDGE | DEVICE_DRIVER | DEVICE_DRIVER_OK | DEVICE_FEATURES_OK) as u8; @@ -460,7 +448,7 @@ impl PciDevice for VirtioPciDevice { fn ioeventfds(&self) -> Vec<(&EventFd, u64, Datamatch)> { let bar0 = self.config_regs.get_bar_addr(self.settings_bar as usize); let notify_base = bar0 + NOTIFICATION_BAR_OFFSET; - self.queue_evts() + self.queue_evts .iter() .enumerate() .map(|(i, event)| {