diff options
| author | Danilo Krummrich <dakr@kernel.org> | 2025-11-03 21:39:18 +0100 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2025-11-05 01:26:51 +0100 |
| commit | 1bf5b90cd2f984e5d6ff6fd30d5d85f9f579b6f0 (patch) | |
| tree | 761bf0454f48d94d1fc093e40cc7071defde91ec /rust/kernel/debugfs/traits.rs | |
| parent | f656279afde16afee3ac163b90584ddceacb4e61 (diff) | |
rust: auxiliary: fix false positive warning for missing a safety comment
Some older (yet supported) versions of clippy throw a false positive
warning for missing a safety comment when the safety comment is on a
multiline statement.
warning: unsafe block missing a safety comment
--> rust/kernel/auxiliary.rs:351:22
|
351 | Self(unsafe { NonNull::new_unchecked(adev) }),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider adding a safety comment on the preceding line
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#undocumented_unsafe_blocks
= note: requested on the command line with `-W clippy::undocumented-unsafe-blocks`
warning: 1 warning emitted
Fix this by placing the safety comment right on top of the same line
introducing the unsafe block.
Fixes: e4e679c8608e ("rust: auxiliary: unregister on parent device unbind")
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/20251103203932.2361660-1-dakr@kernel.org
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'rust/kernel/debugfs/traits.rs')
0 files changed, 0 insertions, 0 deletions