[PATCH v2 1/4] rust: io: define ResourceSize as resource_size_t

Alice Ryhl posted 4 patches 1 month, 1 week ago
[PATCH v2 1/4] rust: io: define ResourceSize as resource_size_t
Posted by Alice Ryhl 1 month, 1 week ago
These typedefs are always equivalent so this should not change anything,
but the code makes a lot more sense like this.

Cc: stable@vger.kernel.org # for v6.18
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
 rust/kernel/io/resource.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/kernel/io/resource.rs b/rust/kernel/io/resource.rs
index bea3ee0ed87b51816e2afb5a8a36fedee60d0e06..11b6bb9678b4e36603cc26fa2d6552c0a7e8276c 100644
--- a/rust/kernel/io/resource.rs
+++ b/rust/kernel/io/resource.rs
@@ -16,7 +16,7 @@
 ///
 /// This is a type alias to either `u32` or `u64` depending on the config option
 /// `CONFIG_PHYS_ADDR_T_64BIT`, and it can be a u64 even on 32-bit architectures.
-pub type ResourceSize = bindings::phys_addr_t;
+pub type ResourceSize = bindings::resource_size_t;
 
 /// A region allocated from a parent [`Resource`].
 ///

-- 
2.51.2.1041.gc1ab5b90ca-goog
Re: [PATCH v2 1/4] rust: io: define ResourceSize as resource_size_t
Posted by Miguel Ojeda 1 month, 1 week ago
On Wed, Nov 12, 2025 at 10:49 AM Alice Ryhl <aliceryhl@google.com> wrote:
>
> These typedefs are always equivalent so this should not change anything,
> but the code makes a lot more sense like this.
>
> Cc: stable@vger.kernel.org # for v6.18

From the cover letter thread, if we treat this as a fix, then this should be:

Cc: stable@vger.kernel.org
Fixes: 493fc33ec252 ("rust: io: add resource abstraction")

(Replying here as well in case it helps automated tooling to pick it up)

Cheers,
Miguel