]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: io: define ResourceSize as resource_size_t
authorAlice Ryhl <aliceryhl@google.com>
Wed, 12 Nov 2025 09:48:32 +0000 (09:48 +0000)
committerDanilo Krummrich <dakr@kernel.org>
Thu, 13 Nov 2025 08:58:24 +0000 (19:58 +1100)
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
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Fixes: 493fc33ec252 ("rust: io: add resource abstraction")
Link: https://patch.msgid.link/20251112-resource-phys-typedefs-v2-1-538307384f82@google.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/io/resource.rs

index 81220493a7f3854eecd6a351372230cc69a09be2..e294af96b374a3f52ffb931c40c608e8ba381e8f 100644 (file)
@@ -20,7 +20,7 @@ use crate::{
 ///
 /// 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`].
 ///