diff mbox series

rust: pl011: fix repr(C) for PL011Class

Message ID 20250121161546.2233086-1-pbonzini@redhat.com (mailing list archive)
State New
Headers show
Series rust: pl011: fix repr(C) for PL011Class | expand

Commit Message

Paolo Bonzini Jan. 21, 2025, 4:15 p.m. UTC
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 rust/hw/char/pl011/src/device.rs | 1 +
 1 file changed, 1 insertion(+)

Comments

Zhao Liu Jan. 22, 2025, 2:31 a.m. UTC | #1
On Tue, Jan 21, 2025 at 05:15:46PM +0100, Paolo Bonzini wrote:
> Date: Tue, 21 Jan 2025 17:15:46 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: [PATCH] rust: pl011: fix repr(C) for PL011Class
> X-Mailer: git-send-email 2.47.1
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>  rust/hw/char/pl011/src/device.rs | 1 +
>  1 file changed, 1 insertion(+)
>  

Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
diff mbox series

Patch

diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs
index c95ab49fd62..4f1080ff19f 100644
--- a/rust/hw/char/pl011/src/device.rs
+++ b/rust/hw/char/pl011/src/device.rs
@@ -130,6 +130,7 @@  pub struct PL011State {
 
 qom_isa!(PL011State : SysBusDevice, DeviceState, Object);
 
+#[repr(C)]
 pub struct PL011Class {
     parent_class: <SysBusDevice as ObjectType>::Class,
     /// The byte string that identifies the device.