[PATCH 6/6] rust/system: Stop exposing bogus DEVICE_NATIVE_ENDIAN symbol

Philippe Mathieu-Daudé posted 6 patches 1 month, 3 weeks ago
Maintainers: Peter Maydell <peter.maydell@linaro.org>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Michael S. Tsirkin" <mst@redhat.com>, Max Filippov <jcmvbkbc@gmail.com>, Jason Wang <jasowang@redhat.com>, Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
There is a newer version of this series
[PATCH 6/6] rust/system: Stop exposing bogus DEVICE_NATIVE_ENDIAN symbol
Posted by Philippe Mathieu-Daudé 1 month, 3 weeks ago
We want to remove the bogus DEVICE_NATIVE_ENDIAN definition
(by only having it explicit, either big or little one). Stop
exposing it to rust devices to avoid it spreading further.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 rust/system/src/memory.rs | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/rust/system/src/memory.rs b/rust/system/src/memory.rs
index 4b3316bf767..4e06c16a0b5 100644
--- a/rust/system/src/memory.rs
+++ b/rust/system/src/memory.rs
@@ -78,12 +78,6 @@ pub const fn little_endian(mut self) -> Self {
         self
     }
 
-    #[must_use]
-    pub const fn native_endian(mut self) -> Self {
-        self.0.endianness = device_endian::DEVICE_NATIVE_ENDIAN;
-        self
-    }
-
     #[must_use]
     pub const fn valid_sizes(mut self, min: u32, max: u32) -> Self {
         self.0.valid.min_access_size = min;
-- 
2.52.0


Re: [PATCH 6/6] rust/system: Stop exposing bogus DEVICE_NATIVE_ENDIAN symbol
Posted by Richard Henderson 1 month, 3 weeks ago
On 12/19/25 05:18, Philippe Mathieu-Daudé wrote:
> We want to remove the bogus DEVICE_NATIVE_ENDIAN definition
> (by only having it explicit, either big or little one). Stop
> exposing it to rust devices to avoid it spreading further.
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   rust/system/src/memory.rs | 6 ------
>   1 file changed, 6 deletions(-)
> 
> diff --git a/rust/system/src/memory.rs b/rust/system/src/memory.rs
> index 4b3316bf767..4e06c16a0b5 100644
> --- a/rust/system/src/memory.rs
> +++ b/rust/system/src/memory.rs
> @@ -78,12 +78,6 @@ pub const fn little_endian(mut self) -> Self {
>           self
>       }
>   
> -    #[must_use]
> -    pub const fn native_endian(mut self) -> Self {
> -        self.0.endianness = device_endian::DEVICE_NATIVE_ENDIAN;
> -        self
> -    }
> -
>       #[must_use]
>       pub const fn valid_sizes(mut self, min: u32, max: u32) -> Self {
>           self.0.valid.min_access_size = min;

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~