qemu-rust
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 07/10] rust/timer/hpet: define hpet_cfg


From: Zhao Liu
Subject: Re: [PATCH 07/10] rust/timer/hpet: define hpet_cfg
Date: Fri, 7 Feb 2025 22:30:40 +0800

On Wed, Jan 29, 2025 at 11:58:46AM +0100, Paolo Bonzini wrote:
> Date: Wed, 29 Jan 2025 11:58:46 +0100
> From: Paolo Bonzini <pbonzini@redhat.com>
> Subject: Re: [PATCH 07/10] rust/timer/hpet: define hpet_cfg
> 
> 
> 
> On Sat, Jan 25, 2025 at 1:32 PM Zhao Liu <zhao1.liu@intel.com> wrote:
> > @@ -5,6 +5,7 @@ edition = "2021"
> >  authors = ["Zhao Liu <zhao1.liu@intel.com>"]
> >  license = "GPL-2.0-or-later"
> >  description = "IA-PC High Precision Event Timer emulation in Rust"
> 
> Please add
> 
> rust-version = "1.63.0"
> 
> here.

Done.

> > +        // SAFETY: all accesses go through these methods, which guarantee
> > +        // that the accesses are protected by the BQL.
> > +        let fw_cfg = unsafe { &mut hpet_fw_cfg };
> 
> Clippy complains about references to static mut; use
> 
>    let mut fw_cfg = unsafe { *addr_of_mut!(hpet_fw_cfg) };
> 
> to make it happy; same below in update_hpet_cfg().
> 

Fixed. Thanks!!

Regards,
Zhao




reply via email to

[Prev in Thread] Current Thread [Next in Thread]