wl: Fix unused_imports and dead_code warnings

These functions are only used when the gpu feature is enabled.

BUG=none
TEST=`cargo build` and see no warnings

Change-Id: I8c354b0122032a6d6c57d16837d9d9e857ac03c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/2891122
Tested-by: kokoro <noreply+kokoro@google.com>
Commit-Queue: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-by: Keiichi Watanabe <keiichiw@chromium.org>
This commit is contained in:
Chirantan Ekbote 2021-05-12 20:00:36 +09:00 committed by Commit Bot
parent 0c6d96af7b
commit c4ce3791e9

View file

@ -64,6 +64,7 @@ use vm_memory::{GuestMemory, GuestMemoryError};
#[cfg(feature = "minigbm")]
use vm_control::GpuMemoryDesc;
#[cfg(feature = "gpu")]
use super::resource_bridge::{
get_resource_info, BufferInfo, ResourceBridgeError, ResourceInfo, ResourceRequest,
};
@ -489,6 +490,7 @@ impl CtrlVfdSendVfdV2 {
);
unsafe { self.payload.id }
}
#[cfg(feature = "gpu")]
fn seqno(&self) -> Le64 {
assert!(self.kind == VIRTIO_WL_CTRL_VFD_SEND_KIND_VIRTGPU_FENCE);
unsafe { self.payload.seqno }