summaryrefslogtreecommitdiff
path: root/rust/kernel
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2026-07-16 19:09:26 +0200
committerBreno Leitao <leitao@debian.org>2026-10-16 09:17:20 -0700
commite24fdc27dc37a816cfc7b08ff9e1664b6ec8ca7f (patch)
treebbfcdb2cb4fb104541df239592bdcd7679890693 /rust/kernel
parent6b1b324e96dce23de8e204e277258ddc46d8d2ca (diff)
rust: configfs: remove mutability from some field initializers
These fields do not require mutable pointers. Use regular immutable ones. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Acked-by: Andreas Hindborg <a.hindborg@kernel.org> Link: https://patch.msgid.link/20260716-configfs-const-base-v1-1-c545a4053cb5@weissschuh.net Signed-off-by: Breno Leitao <leitao@debian.org>
Diffstat (limited to 'rust/kernel')
-rw-r--r--rust/kernel/configfs.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/kernel/configfs.rs b/rust/kernel/configfs.rs
index cd082b83e9e7..5c66b7e4b109 100644
--- a/rust/kernel/configfs.rs
+++ b/rust/kernel/configfs.rs
@@ -754,8 +754,8 @@ macro_rules! impl_item_type {
Self {
item_type: Opaque::new(bindings::config_item_type {
ct_owner: owner.as_ptr(),
- ct_group_ops: GroupOperationsVTable::<Data, Child>::vtable_ptr().cast_mut(),
- ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr().cast_mut(),
+ ct_group_ops: GroupOperationsVTable::<Data, Child>::vtable_ptr(),
+ ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr(),
ct_attrs: core::ptr::from_ref(attributes).cast_mut().cast(),
ct_bin_attrs: core::ptr::null_mut(),
}),
@@ -771,8 +771,8 @@ macro_rules! impl_item_type {
Self {
item_type: Opaque::new(bindings::config_item_type {
ct_owner: owner.as_ptr(),
- ct_group_ops: core::ptr::null_mut(),
- ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr().cast_mut(),
+ ct_group_ops: core::ptr::null(),
+ ct_item_ops: ItemOperationsVTable::<$tpe, Data>::vtable_ptr(),
ct_attrs: core::ptr::from_ref(attributes).cast_mut().cast(),
ct_bin_attrs: core::ptr::null_mut(),
}),