On Thu, Dec 12, 2024 at 06:22:00PM +0100, Paolo Bonzini wrote: > Date: Thu, 12 Dec 2024 18:22:00 +0100 > From: Paolo Bonzini <[email protected]> > Subject: [PATCH 3/7] rust: pl011: always use reset() method on registers > X-Mailer: git-send-email 2.47.1 > > For CR, the ugly-ish "0.into()" idiom is already hidden within the > Default trait. Do not repeat it. > > For FR, standardize on reset() being equivalent to "*self = Self::default()" > and let reset_fifo toggle only the bits that are related to FIFOs. This > commit also reproduces C commit 02b1f7f6192 ("hw/char/pl011: Split RX/TX > path of pl011_reset_fifo()", 2024-09-13). > > Signed-off-by: Paolo Bonzini <[email protected]> > --- > rust/hw/char/pl011/src/device.rs | 23 ++++++++++++++++------- > rust/hw/char/pl011/src/lib.rs | 13 +++++-------- > 2 files changed, 21 insertions(+), 15 deletions(-) >
Reviewed-by: Zhao Liu <[email protected]>
