]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: dma: remove incorrect safety documentation
authorYilin Chen <1479826151@qq.com>
Sun, 28 Dec 2025 16:52:34 +0000 (00:52 +0800)
committerDanilo Krummrich <dakr@kernel.org>
Mon, 29 Dec 2025 11:41:02 +0000 (12:41 +0100)
Removes a safety requirement that incorrectly states callers must
ensure the device does not access memory while the returned slice
is live, as this method doesn't return a slice.

Fixes: d37a39f607c4 ("rust: dma: add as_slice/write functions for CoherentAllocation")
Signed-off-by: Yilin Chen <1479826151@qq.com>
Link: https://patch.msgid.link/tencent_5195C0324923A2B67DEF8AE4B8E139BCB105@qq.com
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/dma.rs

index 84d3c67269e851c9972c68be08978dce63a19451..2ac107d8f7b78c15c595f26f63659c833760a6a1 100644 (file)
@@ -532,8 +532,6 @@ impl<T: AsBytes + FromBytes> CoherentAllocation<T> {
     ///
     /// # Safety
     ///
-    /// * Callers must ensure that the device does not read/write to/from memory while the returned
-    ///   slice is live.
     /// * Callers must ensure that this call does not race with a read or write to the same region
     ///   that overlaps with this write.
     ///