Description
Since Rust 1.82.0, the raw_ref_op
feature is stable. This means that in order to get a raw pointer to a place, one can write &raw place
instead of having to use addr_of!(place)
.
A patch series addressing this issue should:
- rewrite any usage of the
addr_of[_mut]!
macros to use the raw ref operators instead. - enable the
raw_ref_op
feature. The reason for this is that the kernel currently has a minimum Rust version of 1.78.0. So older compilers will need to have it enabled. Since it already is stable in a newer version this is OK. - add these macros to the
disallowed-macros
list in.clippy.toml
to prevent further introductions of that macro.
This requires submitting a proper patch to the LKML and the Rust for Linux mailing list. Please recall to test your changes (including generating the documentation if changed, running the Rust doctests if changed, etc.), to use a proper title for the commit, to sign your commit under the Developer's Certificate of Origin and to add a Suggested-by:
tag and a Link:
tag to this issue. Please see https://docs.kernel.org/process/submitting-patches.html and https://rust-for-linux.com/contributing for details.
Please take this issue only if you are new to the kernel development process and you would like to use it as a test to submit your first patch to the kernel. Please do not take it if you do not plan to make other contributions to the kernel.