From: Paolo Bonzini Date: Wed, 26 Nov 2025 12:39:08 +0000 (+0100) Subject: rust: do not copy the SysBusDevice X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ebf3fb9a531a14ef4159ac9da874294e74560c54;p=thirdparty%2Fqemu.git rust: do not copy the SysBusDevice Reviewed-by: Zhao Liu Signed-off-by: Paolo Bonzini --- diff --git a/rust/hw/core/src/sysbus.rs b/rust/hw/core/src/sysbus.rs index 68165e8929..ec620639be 100644 --- a/rust/hw/core/src/sysbus.rs +++ b/rust/hw/core/src/sysbus.rs @@ -78,7 +78,7 @@ where assert!(bql::is_locked()); // SAFETY: the BQL ensures that no one else writes to sbd.mmio[], and // the SysBusDevice must be initialized to get an IsA. - let sbd = unsafe { *self.upcast().as_ptr() }; + let sbd = unsafe { &*self.upcast().as_ptr() }; let id: usize = id.try_into().unwrap(); if sbd.mmio[id].memory.is_null() { None