qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 3/7] rust: pl011: always use reset() method on registers


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 3/7] rust: pl011: always use reset() method on registers
Date: Wed, 18 Dec 2024 14:28:21 +0100
User-agent: Mozilla Thunderbird

On 12/12/24 18:22, Paolo Bonzini wrote:
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 <pbonzini@redhat.com>
---
  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: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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