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 <dverkamp@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1898270
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Zach Reizner <zachr@chromium.org>
This commit is contained in:
Daniel Verkamp 2019-11-01 15:25:40 -07:00 committed by Commit Bot
parent 5eca937941
commit 2a9e620f9a

View file

@ -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)| {