]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
rust: io: move ResourceSize to top-level io module
authorAlice Ryhl <aliceryhl@google.com>
Wed, 12 Nov 2025 09:48:33 +0000 (09:48 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Jan 2026 11:57:05 +0000 (12:57 +0100)
commit52df55b21ede5fc0418972754f516a200a460709
tree910f09a8a077b59f4704bf0d9f4d0100e4be6eb2
parent0bf59179bdef493a39061cfd3263bc0578f852b0
rust: io: move ResourceSize to top-level io module

commit dfd67993044f507ba8fd6ee9956f923ba4b7e851 upstream.

Resource sizes are a general concept for dealing with physical
addresses, and not specific to the Resource type, which is just one way
to access physical addresses. Thus, move the typedef to the io module.

Still keep a re-export under resource. This avoids this commit from
being a flag-day, but I also think it's a useful re-export in general so
that you can import

use kernel::io::resource::{Resource, ResourceSize};

instead of having to write

use kernel::io::{
    resource::Resource,
    ResourceSize,
};

in the specific cases where you need ResourceSize because you are using
the Resource type. Therefore I think it makes sense to keep this
re-export indefinitely and it is *not* intended as a temporary re-export
for migration purposes.

Cc: stable@vger.kernel.org # for v6.18 [1]
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251112-resource-phys-typedefs-v2-2-538307384f82@google.com
Link: https://lore.kernel.org/all/20251112-resource-phys-typedefs-v2-0-538307384f82@google.com/
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
rust/kernel/io.rs
rust/kernel/io/resource.rs