From dfa32ea035849b26aa610703314d23868dea35ca Mon Sep 17 00:00:00 2001 From: Chirantan Ekbote Date: Thu, 9 Sep 2021 17:35:29 +0900 Subject: [PATCH] Fix kokoro Update to the latest version of vmm_vhost to pick up the API change. Also fix clippy errors in the gpu device. BUG=b:179755651 TEST=cargo build Change-Id: Ia42681aee1d92f38dfcca1fbf87e8cfd7ac15d95 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3151109 Auto-Submit: Chirantan Ekbote Tested-by: kokoro Reviewed-by: Keiichi Watanabe Reviewed-by: Dennis Kempin Reviewed-by: Daniel Verkamp --- devices/src/virtio/vhost/user/device/gpu.rs | 12 ++++-------- third_party/vmm_vhost | 2 +- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/devices/src/virtio/vhost/user/device/gpu.rs b/devices/src/virtio/vhost/user/device/gpu.rs index aacbc874ed..32520bb413 100644 --- a/devices/src/virtio/vhost/user/device/gpu.rs +++ b/devices/src/virtio/vhost/user/device/gpu.rs @@ -86,11 +86,9 @@ async fn run_ctrl_queue( } } } - } else { - if let Err(e) = kick_evt.next_val().await { - error!("Failed to read kick event for ctrl queue: {}", e); - break; - } + } else if let Err(e) = kick_evt.next_val().await { + error!("Failed to read kick event for ctrl queue: {}", e); + break; } let mut state = state.borrow_mut(); @@ -260,9 +258,8 @@ impl VhostUserBackend for GpuBackend { let kick_evt = EventAsync::new(kick_evt.0, ex).context("failed to create EventAsync for kick_evt")?; - let queue = Arc::new(Mutex::new(queue)); let reader = SharedReader { - queue: queue.clone(), + queue: Arc::new(Mutex::new(queue)), call_evt, }; @@ -464,7 +461,6 @@ pub fn run_gpu_device(program_name: &str, args: std::env::Args) -> anyhow::Resul path.display(), e ); - return; } }) .detach(); diff --git a/third_party/vmm_vhost b/third_party/vmm_vhost index 02f8b005f5..d65bd280d9 160000 --- a/third_party/vmm_vhost +++ b/third_party/vmm_vhost @@ -1 +1 @@ -Subproject commit 02f8b005f568d7d959e1d977c36cbcf635f97043 +Subproject commit d65bd280d9f4e192a884f1761e4b097c11aae6de