diff options
author | 2025-04-09 10:43:16 -0400 | |
---|---|---|
committer | 2025-05-28 18:54:09 +0200 | |
commit | 74d6a606c2b39fd830d2d7a6363bc5688b4e4b56 (patch) | |
tree | 17d0b1b48e8caa5bedb2c47dfa34b3dad628ba40 /scripts/lib/kdoc/kdoc_parser.py | |
parent | Documentation: rust: testing: add docs on the new KUnit `#[test]` tests (diff) | |
download | linux-rng-74d6a606c2b39fd830d2d7a6363bc5688b4e4b56.tar.xz linux-rng-74d6a606c2b39fd830d2d7a6363bc5688b4e4b56.zip |
rust: retain pointer mut-ness in `container_of!`
Avoid casting the input pointer to `*const _`, allowing the output
pointer to be `*mut` if the input is `*mut`. This allows a number of
`*const` to `*mut` conversions to be removed at the cost of slightly
worse ergonomics when the macro is used with a reference rather than a
pointer; the only example of this was in the macro's own doctest.
Reviewed-by: Benno Lossin <benno.lossin@proton.me>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Signed-off-by: Tamir Duberstein <tamird@gmail.com>
Reviewed-by: Andreas Hindborg <a.hindborg@kernel.org>
Link: https://lore.kernel.org/r/20250409-container-of-mutness-v1-1-64f472b94534@gmail.com
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions