Thread (32 messages) 32 messages, 8 authors, 2025-06-22

Re: [PATCH v12 0/6] rust: reduce `as` casts, enable related lints

From: Miguel Ojeda <hidden>
Date: 2025-06-22 22:50:46
Also in: dri-devel, linux-block, linux-devicetree, linux-kbuild, linux-kselftest, linux-mm, linux-pci, linux-pm, lkml, nouveau, rust-for-linux

On Sun, Jun 15, 2025 at 10:55 PM Tamir Duberstein [off-list ref] wrote:
This started with a patch that enabled `clippy::ptr_as_ptr`. Benno
Lossin suggested I also look into `clippy::ptr_cast_constness` and I
discovered `clippy::as_ptr_cast_mut`. This series now enables all 3
lints. It also enables `clippy::as_underscore` which ensures other
pointer casts weren't missed.

As a later addition, `clippy::cast_lossless` and `clippy::ref_as_ptr`
are also enabled.

Signed-off-by: Tamir Duberstein <redacted>
Applied to `rust-next` -- thanks everyone!

    [ Added `.cast()` for `opp`. - Miguel ]

    [ Changed `isize` to `c_long`. - Miguel ]

It would still be nice to get the couple remaining Acked-bys (happy to
rebase to apply them), but I feel we are in good shape, and it is a
good time to put it into linux-next so that people see the lint before
they start applying new code into their branches.

Cheers,
Miguel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help