On Mon, May 26, 2025 at 04:24:54PM +0200, Paolo Bonzini wrote:
> Date: Mon, 26 May 2025 16:24:54 +0200
> From: Paolo Bonzini <pbonz...@redhat.com>
> Subject: [PATCH 11/12] rust/hpet: return errors from realize if properties
>  are incorrect
> X-Mailer: git-send-email 2.49.0
> 
> Match the code in hpet.c; this also allows removing the
> BqlCell from the num_timers field.
> 
> Signed-off-by: Paolo Bonzini <pbonz...@redhat.com>
> ---
>  rust/hw/timer/hpet/src/fw_cfg.rs |  7 +++----
>  rust/hw/timer/hpet/src/hpet.rs   | 16 +++++++---------
>  2 files changed, 10 insertions(+), 13 deletions(-)

Patch is fine for me,

Reviewed-by: Zhao Liu <zhao1....@intel.com>


>          if self.int_route_cap == 0 {
> -            // TODO: Add error binding: warn_report()
> -            println!("Hpet's hpet-intcap property not initialized");
> +            Err("hpet.hpet-intcap property not initialized")?;
>          }

Though here we don't need print warning...do we still need to provide
the warn_report() binding? Or println!() is enough in Rust side?

Thanks,
Zhao


Reply via email to