From 123a434006bd85d83dfeaba10bea248376c2b810 Mon Sep 17 00:00:00 2001 From: Guillaume DIDIER Date: Wed, 3 Jul 2024 11:14:32 +0200 Subject: [PATCH] u64 and usize are not the same type, sorry --- cache_slice/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cache_slice/src/lib.rs b/cache_slice/src/lib.rs index 5f67184..fff0857 100644 --- a/cache_slice/src/lib.rs +++ b/cache_slice/src/lib.rs @@ -98,10 +98,10 @@ fn monitor_core(addr: *const u8, cpu: u8) -> Result, Error> { }; eprint!("Finding the number of CBox available... "); - let max_cbox = read_msr_on_cpu(performance_counters.msr_unc_cbo_config, cpu)? & 0xF; // TODO magic number (mask for bit 3:0) + let max_cbox = (read_msr_on_cpu(performance_counters.msr_unc_cbo_config, cpu)? & 0xF) as usize; // TODO magic number (mask for bit 3:0) eprintln!("{}", max_cbox); - if max_cbox > performance_counters.max_slice as u64 { + if max_cbox > performance_counters.max_slice as usize { return Err(InvalidParameter); }