linux-kernelorg-stable/rust/kernel
Alice Ryhl 64fb810bce rust: types: rename Opaque::raw_get to cast_into
In the previous patch we added Opaque::cast_from() that performs the
opposite operation to Opaque::raw_get(). For consistency with this
naming, rename raw_get() to cast_from().

There are a few other options such as calling cast_from() something
closer to raw_get() rather than renaming this method. However, I could
not find a great naming scheme that works with raw_get(). The previous
version of this patch used from_raw(), but functions of that name
typically have a different signature, so that's not a great option.

Suggested-by: Danilo Krummrich <dakr@kernel.org>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Acked-by: Benno Lossin <lossin@kernel.org>
Acked-by: Andreas Hindborg <a.hindborg@kernel.org>
Acked-by: Boqun Feng <boqun.feng@gmail.com>
Reviewed-by: Danilo Krummrich <dakr@kernel.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250624-opaque-from-raw-v2-2-e4da40bdc59c@google.com
[ Removed `HrTimer::raw_get` change. - Miguel ]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2025-07-15 22:26:11 +02:00
..
alloc rust: types: add FOREIGN_ALIGN to ForeignOwnable 2025-07-14 23:55:24 +02:00
block pin-init changes for v6.17 2025-07-13 23:05:14 +02:00
drm rust: types: add Opaque::cast_from 2025-07-15 21:01:48 +02:00
fs rust: enable `clippy::ref_as_ptr` lint 2025-06-22 23:09:32 +02:00
list rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
mm rust: enable `clippy::as_underscore` lint 2025-06-22 23:09:17 +02:00
net rust: enable `clippy::cast_lossless` lint 2025-06-22 23:09:25 +02:00
sync rust: types: add FOREIGN_ALIGN to ForeignOwnable 2025-07-14 23:55:24 +02:00
time rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
.gitignore
alloc.rs
auxiliary.rs Rust changes for v6.16 2025-06-04 21:18:37 -07:00
block.rs
build_assert.rs
clk.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
configfs.rs rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
cpu.rs rust: cpu: Add CpuId::current() to retrieve current CPU ID 2025-06-12 10:31:28 +05:30
cpufreq.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
cpumask.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
cred.rs
device.rs rust: enable `clippy::ptr_as_ptr` lint 2025-06-22 23:08:42 +02:00
device_id.rs rust: enable `clippy::ref_as_ptr` lint 2025-06-22 23:09:32 +02:00
devres.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
dma.rs rust: enable `clippy::as_underscore` lint 2025-06-22 23:09:17 +02:00
driver.rs
error.rs rust: enable `clippy::as_underscore` lint 2025-06-22 23:09:17 +02:00
faux.rs
firmware.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
fs.rs
generated_arch_static_branch_asm.rs.S
init.rs rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
io.rs rust: io: avoid mentioning private fields in `IoMem` 2025-06-24 01:02:30 +02:00
ioctl.rs
jump_label.rs
kunit.rs rust: kunit: use crate-level mapping for `c_void` 2025-06-24 00:55:22 +02:00
lib.rs rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
list.rs rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
miscdevice.rs rust: types: add FOREIGN_ALIGN to ForeignOwnable 2025-07-14 23:55:24 +02:00
mm.rs mm: rust: make CONFIG_MMU ifdefs more narrow 2025-05-31 22:46:12 -07:00
net.rs
of.rs rust: enable `clippy::as_underscore` lint 2025-06-22 23:09:17 +02:00
opp.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
page.rs
pci.rs rust: types: add FOREIGN_ALIGN to ForeignOwnable 2025-07-14 23:55:24 +02:00
pid_namespace.rs
platform.rs rust: types: add FOREIGN_ALIGN to ForeignOwnable 2025-07-14 23:55:24 +02:00
prelude.rs rust: uaccess: use newtype for user pointers 2025-07-14 23:52:45 +02:00
print.rs rust: enable `clippy::ptr_as_ptr` lint 2025-06-22 23:08:42 +02:00
rbtree.rs rust: rbtree: simplify finding `current` in `remove_current` 2025-07-14 23:53:35 +02:00
revocable.rs rust: revocable: document why &T is not used in RevocableGuard 2025-06-29 18:54:54 +02:00
security.rs
seq_file.rs rust: enable `clippy::ptr_as_ptr` lint 2025-06-22 23:08:42 +02:00
sizes.rs
static_assert.rs
std_vendor.rs
str.rs rust: enable `clippy::ref_as_ptr` lint 2025-06-22 23:09:32 +02:00
sync.rs rust: Use consistent "# Examples" heading style in rustdoc 2025-06-24 01:02:30 +02:00
task.rs
time.rs
tracepoint.rs
transmute.rs
types.rs rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
uaccess.rs rust: uaccess: use newtype for user pointers 2025-07-14 23:52:45 +02:00
workqueue.rs rust: types: rename Opaque::raw_get to cast_into 2025-07-15 22:26:11 +02:00
xarray.rs rust: types: add FOREIGN_ALIGN to ForeignOwnable 2025-07-14 23:55:24 +02:00