Don't use &mut for immutable data
We never modify the VM Base DTBO, and there's no reason we would, so
don't pass around a mutable reference to it.
Bug: 318431695
Test: Still builds
Test: Flash pvmfw, start pVM
Change-Id: Iea3cd40244e9014af96819d0068f389c0923c70c
diff --git a/pvmfw/src/config.rs b/pvmfw/src/config.rs
index 39b7421..7b548ce 100644
--- a/pvmfw/src/config.rs
+++ b/pvmfw/src/config.rs
@@ -141,7 +141,7 @@
pub bcc: &'a mut [u8],
pub debug_policy: Option<&'a [u8]>,
pub vm_dtbo: Option<&'a mut [u8]>,
- pub vm_base_dtbo: Option<&'a mut [u8]>,
+ pub vm_base_dtbo: Option<&'a [u8]>,
}
#[repr(packed)]
@@ -297,6 +297,8 @@
// We have no reason to mutate so drop the `mut`.
let debug_policy = debug_policy.map(|x| &*x);
+ let vm_base_dtbo = vm_base_dtbo.map(|x| &*x);
+
Entries { bcc, debug_policy, vm_dtbo, vm_base_dtbo }
}
}