> On 5 Feb 2026, at 19:43, Danilo Krummrich <[email protected]> wrote: > > On Thu Feb 5, 2026 at 11:31 PM CET, Gary Guo wrote: >> On Thu Feb 5, 2026 at 7:05 PM GMT, Danilo Krummrich wrote: >>> (1) Devices are either little-endian or big-endian. Hence, having to write >>> >>> io.big_endian().write() >>> >>> is excessive, we always want big-endian for a big-endian device. >> >> You don't need to always write this. You just need to do `big_endian()` once >> when you obtain the io, and then keep using `BigEndian<Mmio>` instead of just >> `Mmio`, and the rest of code is still `.write()`. > > <snip> > >>> (2) It is error prone, if you forget to call big_endian() first, it is a >>> bug. >> >> Moot point when `big_endian()` is only done once. > > Well, you need to do it at least once per driver entry point. For DRM IOCTLs > for > instance you also have to consider that it is always Devres<Mmio>. > Well, this is also the case for relaxed(). I basically made peace with the fact that let mmio = mmio.relaxed(); < use mmio > is going to be a reality per driver entrypoint, unless I misunderstood? — Daniel
- Re: [PATCH v2 1/4] rust: io: Add big-endian read... Danilo Krummrich
- Re: [PATCH v2 1/4] rust: io: Add big-endian read... Daniel Almeida
- Re: [PATCH v2 1/4] rust: io: Add big-endian ... Danilo Krummrich
- Re: [PATCH v2 1/4] rust: io: Add big-endian ... Gary Guo
- Re: [PATCH v2 1/4] rust: io: Add big-end... Daniel Almeida
- Re: [PATCH v2 1/4] rust: io: Add bi... Danilo Krummrich
- Re: [PATCH v2 1/4] rust: io: Ad... Link Mauve
- Re: [PATCH v2 1/4] rust: io: Ad... Danilo Krummrich
- Re: [PATCH v2 1/4] rust: io: Ad... Gary Guo
- Re: [PATCH v2 1/4] rust: io: Ad... Danilo Krummrich
- Re: [PATCH v2 1/4] rust: io: Ad... Daniel Almeida
- Re: [PATCH v2 1/4] rust: io: Ad... Danilo Krummrich
- Re: [PATCH v2 1/4] rust: io: Ad... Danilo Krummrich
- [PATCH v2 2/4] rust: nvmem: Add an abstraction for nvmem ... Link Mauve
- Re: [PATCH v2 2/4] rust: nvmem: Add an abstraction f... Danilo Krummrich
- Re: [PATCH v2 2/4] rust: nvmem: Add an abstracti... Link Mauve
- Re: [PATCH v2 2/4] rust: nvmem: Add an abstr... Danilo Krummrich
- [PATCH v2 3/4] nvmem: Replace the Wii and Wii U OTP drive... Link Mauve
- [PATCH v2 4/4] powerpc: wii_defconfig: Enable Rust Link Mauve
