diff options
| author | 2025-06-15 16:55:07 -0400 | |
|---|---|---|
| committer | 2025-06-22 23:09:09 +0200 | |
| commit | 23773bd8da719b83013e66795e990036c4bfe014 (patch) | |
| tree | 39861c2ab5b4b751e4bef4a8ce734a624c73ae39 /rust/kernel/mm | |
| parent | rust: enable `clippy::ptr_cast_constness` lint (diff) | |
| download | wireguard-linux-23773bd8da719b83013e66795e990036c4bfe014.tar.xz wireguard-linux-23773bd8da719b83013e66795e990036c4bfe014.zip | |
rust: enable `clippy::as_ptr_cast_mut` lint
In Rust 1.66.0, Clippy introduced the `as_ptr_cast_mut` lint [1]:
> Since `as_ptr` takes a `&self`, the pointer won’t have write
> permissions unless interior mutability is used, making it unlikely
> that having it as a mutable pointer is correct.
There is only one affected callsite, and the change amounts to replacing
`as _` with `.cast_mut().cast()`. This doesn't change the semantics, but
is more descriptive of what's going on.
Apply this change and enable the lint -- no functional change intended.
Link: https://rust-lang.github.io/rust-clippy/master/index.html#as_ptr_cast_mut [1]
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Boqun Feng <boqun.feng@gmail.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Acked-by: Danilo Krummrich <dakr@kernel.org>
Link: https://lore.kernel.org/r/20250615-ptr-as-ptr-v12-3-f43b024581e8@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/mm')
0 files changed, 0 insertions, 0 deletions
