From 585e8a26abfd0c453f01ef78bd637cb7600e9b04 Mon Sep 17 00:00:00 2001 From: Alok Tiwari Date: Sat, 10 Jan 2026 03:51:56 -0800 Subject: [PATCH] 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 Reviewed-by: Alice Ryhl Link: https://patch.msgid.link/20260110115159.2313116-1-alok.a.tiwari@oracle.com Signed-off-by: Danilo Krummrich --- rust/kernel/platform.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rust/kernel/platform.rs b/rust/kernel/platform.rs index 8836ac46b066..bdf89c8293fc 100644 --- a/rust/kernel/platform.rs +++ b/rust/kernel/platform.rs @@ -103,7 +103,7 @@ impl Adapter { // SAFETY: The platform bus only ever calls the remove callback with a valid pointer to a // `struct platform_device`. // - // INVARIANT: `pdev` is valid for the duration of `probe_callback()`. + // INVARIANT: `pdev` is valid for the duration of `remove_callback()`. let pdev = unsafe { &*pdev.cast::>() }; // SAFETY: `remove_callback` is only ever called after a successful call to -- 2.47.3