Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rust: platform: fix remove_callback invariant comment

Correct copy-paste errors where remove_callback safety invariants
incorrectly referenced probe_callback().

Signed-off-by: Alok Tiwari <alok.a.tiwari@oracle.com>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20260110115159.2313116-1-alok.a.tiwari@oracle.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>

authored by

Alok Tiwari and committed by
Danilo Krummrich
585e8a26 601cd264

+1 -1
+1 -1
rust/kernel/platform.rs
··· 103 103 // SAFETY: The platform bus only ever calls the remove callback with a valid pointer to a 104 104 // `struct platform_device`. 105 105 // 106 - // INVARIANT: `pdev` is valid for the duration of `probe_callback()`. 106 + // INVARIANT: `pdev` is valid for the duration of `remove_callback()`. 107 107 let pdev = unsafe { &*pdev.cast::<Device<device::CoreInternal>>() }; 108 108 109 109 // SAFETY: `remove_callback` is only ever called after a successful call to