rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] Rust: Fix typedefs for resource_size_t and phys_addr_t
@ 2025-11-12  9:48 Alice Ryhl
  2025-11-12  9:48 ` [PATCH v2 1/4] rust: io: define ResourceSize as resource_size_t Alice Ryhl
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Alice Ryhl @ 2025-11-12  9:48 UTC (permalink / raw)
  To: Danilo Krummrich, Daniel Almeida
  Cc: Miguel Ojeda, Boqun Feng, Gary Guo, Björn Roy Baron,
	Benno Lossin, Andreas Hindborg, Trevor Gross, Abdiel Janulgue,
	Robin Murphy, Greg Kroah-Hartman, Rafael J. Wysocki,
	rust-for-linux, linux-kernel, Alice Ryhl, stable

This changes ResourceSize to use the resource_size_t typedef (currently
ResourceSize is defined as phys_addr_t), and moves ResourceSize to
kernel::io and defines PhysAddr next to it. Any usage of ResourceSize or
bindings::phys_addr_t that references a physical address is updated to
use the new PhysAddr typedef.

I included some cc stable annotations because I think it is useful to
backport this to v6.18. This is to make backporting drivers to the 6.18
LTS easier as we will not have to worry about changing imports when
backporting.

Signed-off-by: Alice Ryhl <aliceryhl@google.com>
---
Changes in v2:
- Fix build error in last patch.
- Add cc stable.
- Link to v1: https://lore.kernel.org/r/20251106-resource-phys-typedefs-v1-0-0c0edc7301ce@google.com

---
Alice Ryhl (4):
      rust: io: define ResourceSize as resource_size_t
      rust: io: move ResourceSize to top-level io module
      rust: scatterlist: import ResourceSize from kernel::io
      rust: io: add typedef for phys_addr_t

 rust/kernel/devres.rs      | 18 +++++++++++++++---
 rust/kernel/io.rs          | 26 +++++++++++++++++++++++---
 rust/kernel/io/resource.rs | 13 ++++++-------
 rust/kernel/scatterlist.rs |  2 +-
 4 files changed, 45 insertions(+), 14 deletions(-)
---
base-commit: 211ddde0823f1442e4ad052a2f30f050145ccada
change-id: 20251106-resource-phys-typedefs-6db37927d159

Best regards,
-- 
Alice Ryhl <aliceryhl@google.com>


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2025-11-13  9:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12  9:48 [PATCH v2 0/4] Rust: Fix typedefs for resource_size_t and phys_addr_t Alice Ryhl
2025-11-12  9:48 ` [PATCH v2 1/4] rust: io: define ResourceSize as resource_size_t Alice Ryhl
2025-11-12 10:56   ` Miguel Ojeda
2025-11-12  9:48 ` [PATCH v2 2/4] rust: io: move ResourceSize to top-level io module Alice Ryhl
2025-11-12  9:48 ` [PATCH v2 3/4] rust: scatterlist: import ResourceSize from kernel::io Alice Ryhl
2025-11-12  9:48 ` [PATCH v2 4/4] rust: io: add typedef for phys_addr_t Alice Ryhl
2025-11-12 10:12 ` [PATCH v2 0/4] Rust: Fix typedefs for resource_size_t and phys_addr_t Miguel Ojeda
2025-11-12 10:24   ` Alice Ryhl
2025-11-12 10:43     ` Alice Ryhl
2025-11-12 10:54       ` Miguel Ojeda
2025-11-12 11:50     ` Miguel Ojeda
2025-11-13  9:23 ` Danilo Krummrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).