rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: yilin <1479826151@qq.com>
To: Danilo Krummrich <dakr@kernel.org>, Miguel Ojeda <ojeda@kernel.org>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
	yilin <1479826151@qq.com>
Subject: [PATCH 2/3] rust: dma: remove incorrect safety documentation
Date: Thu, 11 Dec 2025 23:17:48 +0800	[thread overview]
Message-ID: <tencent_DFB9918EA024C929E2BF3DE6EAF938EFB905@qq.com> (raw)
In-Reply-To: <20251211151553.2893838-1-1479826151@qq.com>

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.

Signed-off-by: yilin <1479826151@qq.com>
---
 rust/kernel/dma.rs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/rust/kernel/dma.rs b/rust/kernel/dma.rs
index 84d3c6726..2ac107d8f 100644
--- a/rust/kernel/dma.rs
+++ b/rust/kernel/dma.rs
@@ -532,8 +532,6 @@ pub unsafe fn as_slice_mut(&mut self, offset: usize, count: usize) -> Result<&mu
     ///
     /// # 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.
     ///
-- 
2.34.1


  parent reply	other threads:[~2025-12-11 15:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20251211151553.2893838-1-1479826151@qq.com>
2025-12-11 15:17 ` [PATCH 1/3] rust: device_id: replace possible incorrect word in safety document yilin
2025-12-11 15:17 ` yilin [this message]
2025-12-11 15:17 ` [PATCH 3/3] rust: cpumask: rename methods of Cpumask for clarity and consistency yilin
2025-12-17 20:35   ` Alice Ryhl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tencent_DFB9918EA024C929E2BF3DE6EAF938EFB905@qq.com \
    --to=1479826151@qq.com \
    --cc=dakr@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).