summary refs log tree commit diff stats
path: root/rust/hw/char/pl011/src
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2025-02-27 18:19:35 +0100
committerPaolo Bonzini <pbonzini@redhat.com>2025-03-06 12:44:47 +0100
commit519088b7cf6dbdef08d8753b57aa29162b83d1a1 (patch)
tree9b35f28f0fc343b16d2eff5fc71f3f90c951e3aa /rust/hw/char/pl011/src
parentaa50bc4fb9d4fc1dc027c4d70babe0acb6c09971 (diff)
downloadfocaccia-qemu-519088b7cf6dbdef08d8753b57aa29162b83d1a1.tar.gz
focaccia-qemu-519088b7cf6dbdef08d8753b57aa29162b83d1a1.zip
rust: hpet: decode HPET registers into enums
Generalize timer_and_addr() to decode all registers into a single enum
HPETRegister, and use the TryInto derive to separate valid and
invalid values.

The main advantage lies in checking that all registers are enumerated
in the "match" statements.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust/hw/char/pl011/src')
-rw-r--r--rust/hw/char/pl011/src/lib.rs2
1 files changed, 0 insertions, 2 deletions
diff --git a/rust/hw/char/pl011/src/lib.rs b/rust/hw/char/pl011/src/lib.rs
index 45c13ba899..dbae76991c 100644
--- a/rust/hw/char/pl011/src/lib.rs
+++ b/rust/hw/char/pl011/src/lib.rs
@@ -12,8 +12,6 @@
 //! See [`PL011State`](crate::device::PL011State) for the device model type and
 //! the [`registers`] module for register types.
 
-#![allow(clippy::upper_case_acronyms)]
-
 use qemu_api::c_str;
 
 mod device;