Skip to content

rust: Move unfit code out of `rust/kernel/types.rs`

Aliet Exposito Garcia rust-for-linux 1 version Applied

Status from this message: Applied to `rust-next` -- thanks everyone!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 8 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2rust: Move `FromBytes` and `AsBytes` traits to a new `transmute` modulerust/kernel/lib.rs rust/kernel/transmute.rs rust/kernel/types.rs +1 more+69 -652 replies
2/2rust: Move `ARef<T>` and `AlwaysRefCounted` to new `sync::aref` moduledrivers/block/rnull.rs rust/kernel/block/mq.rs rust/kernel/block/mq/operations.rs +6 more+167 -1642 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchBenno LossinFiona Behrens
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/2] rust: Move unfit code out of `rust/kernel/types.rs`

Hello all,
These are the patches for a good first issue that Benno Lossin oppened on https://github.com/Rust-for-Linux/linux/issues/1117
According to the issue description, the file rust/kernel/types.rs is a rather non-descriptive, general file that contains code that might be better suited elsewhere:
- ARef<T> and AlwaysRefCounted should be in rust/kernel/sync/aref.rs
- The FromBytes and AsBytes traits and implementations should be in rust/kernel/transmute.rs

Aliet Exposito Garcia (2):
rust: Move FromBytes and AsBytes traits to a new transmute
module
rust: Move ARef<T> and AlwaysRefCounted to new sync::aref module

 drivers/block/rnull.rs             |   3 +-
 rust/kernel/block/mq.rs            |   6 +-
 rust/kernel/block/mq/operations.rs |   2 +-
 rust/kernel/block/mq/request.rs    |   3 +-
 rust/kernel/device.rs              |   8 +-
 rust/kernel/lib.rs                 |   1 +
 rust/kernel/sync.rs                |   1 +
 rust/kernel/sync/aref.rs           | 152 ++++++++++++++++++++
 rust/kernel/task.rs                |   4 +-
 rust/kernel/transmute.rs           |  67 +++++++++
 rust/kernel/types.rs               | 216 +----------------------------
 rust/kernel/uaccess.rs             |   2 +-
 12 files changed, 236 insertions(+), 229 deletions(-)
 create mode 100644 rust/kernel/sync/aref.rs
 create mode 100644 rust/kernel/transmute.rs

base-commit: a2f11547052001bd448ccec81dd1e68409078fbb

Signature · 1 line
2.46.0