mirror of
https://chromium.googlesource.com/crosvm/crosvm
synced 2025-02-11 04:26:38 +00:00
devices: vfio: remove unnecessary MemSlot casts
The values that were cast in these expressions were already MemSlot, so there is no need to cast back and forth between MemSlot and u32. BUG=None TEST=tools/presubmit Change-Id: I8a215bc50d10a93b21f6d2fe7e4ed7267242a50b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/3508320 Reviewed-by: Alexandre Courbot <acourbot@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Commit-Queue: Daniel Verkamp <dverkamp@chromium.org>
This commit is contained in:
parent
4440db2370
commit
6ba4551b43
1 changed files with 2 additions and 2 deletions
|
@ -918,7 +918,7 @@ impl VfioPciDevice {
|
|||
};
|
||||
match response {
|
||||
VmMemoryResponse::RegisterMemory { pfn: _, slot } => {
|
||||
mmaps_slots.push(slot as MemSlot);
|
||||
mmaps_slots.push(slot);
|
||||
}
|
||||
_ => break,
|
||||
}
|
||||
|
@ -931,7 +931,7 @@ impl VfioPciDevice {
|
|||
fn remove_bar_mmap(&self, mmap_slot: &MemSlot) {
|
||||
if self
|
||||
.vm_socket_mem
|
||||
.send(&VmMemoryRequest::UnregisterMemory(*mmap_slot as u32))
|
||||
.send(&VmMemoryRequest::UnregisterMemory(*mmap_slot))
|
||||
.is_err()
|
||||
{
|
||||
error!("failed to send UnregisterMemory request");
|
||||
|
|
Loading…
Reference in a new issue