From: Ivan Tverdokhleb <mbkchelofficialdev@gmail.com>
To: rust-for-linux@vger.kernel.org
Cc: "Ivan Tverdokhleb" <mbkchelofficialdev@gmail.com>,
"Will Deacon" <will@kernel.org>,
"Peter Zijlstra" <peterz@infradead.org>,
"Boqun Feng" <boqun@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Gary Guo" <gary@garyguo.net>,
"Alice Ryhl" <aliceryhl@google.com>,
"Lyude Paul" <lyude@redhat.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Onur Özkan" <work@onurozkan.dev>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH 2/2] rust: sync: atomic: Fix typo in SAFETY comment for `isize`
Date: Mon, 16 Nov 2026 21:50:09 +0200 [thread overview]
Message-ID: <20261116195011.24156-2-mbkchelofficialdev@gmail.com> (raw)
In-Reply-To: <20261116195011.24156-1-mbkchelofficialdev@gmail.com>
The SAFETY comment for the `AtomicAdd<isize>` impl of `isize` says
the result is a valid `usize`. Fix it to say `isize`.
Signed-off-by: Ivan Tverdokhleb <mbkchelofficialdev@gmail.com>
---
rust/kernel/sync/atomic/predefine.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/kernel/sync/atomic/predefine.rs b/rust/kernel/sync/atomic/predefine.rs
index 3d63f40791fa..61394a32951a 100644
--- a/rust/kernel/sync/atomic/predefine.rs
+++ b/rust/kernel/sync/atomic/predefine.rs
@@ -106,7 +106,7 @@ unsafe impl super::AtomicType for isize {
type Repr = isize_atomic_repr;
}
-// SAFETY: The wrapping add result of two `isize_atomic_repr`s is a valid `usize`.
+// SAFETY: The wrapping add result of two `isize_atomic_repr`s is a valid `isize`.
unsafe impl super::AtomicAdd<isize> for isize {
fn rhs_into_delta(rhs: isize) -> isize_atomic_repr {
rhs as isize_atomic_repr
--
2.56.1
prev parent reply other threads:[~2026-11-16 19:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 19:50 [PATCH 1/2] rust: sync: atomic: Update safety requirements for `AtomicAdd` Ivan Tverdokhleb
2026-11-16 19:50 ` Ivan Tverdokhleb [this message]
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=20261116195011.24156-2-mbkchelofficialdev@gmail.com \
--to=mbkchelofficialdev@gmail.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=lyude@redhat.com \
--cc=mark.rutland@arm.com \
--cc=ojeda@kernel.org \
--cc=peterz@infradead.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=will@kernel.org \
--cc=work@onurozkan.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.