qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 4/7] rust: pl011: fix break errors and definition of Data str


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH 4/7] rust: pl011: fix break errors and definition of Data struct
Date: Wed, 18 Dec 2024 15:49:24 +0100
User-agent: Mozilla Thunderbird

On 12/12/24 18:22, Paolo Bonzini wrote:
The Data struct is wrong, and does not show how bits 8-15 of DR
are the receive status.  Fix it, and use it to fix break
errors ("c >> 8" in the C code does not translate to
"c.to_be_bytes()[3]").

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
  rust/hw/char/pl011/src/device.rs | 15 ++++++------
  rust/hw/char/pl011/src/lib.rs    | 41 ++++++++++++++++++++++----------
  2 files changed, 36 insertions(+), 20 deletions(-)


      impl ReceiveStatusErrorClear {
+        pub fn set_from_data(&mut self, data: Data) {
+            self.set_errors(data.errors());

It took me some time to understand where is 'c >> 8'.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>

+        }
+




reply via email to

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