From: "Danilo Krummrich" <dakr@kernel.org>
To: "Albab Hasan" <albabhasan276@gmail.com>
Cc: "Miguel Ojeda" <ojeda@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Robin Murphy" <robin.murphy@arm.com>,
rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rust: io: convert `PhysAddr` type alias to newtype
Date: Tue, 05 May 2026 00:08:12 +0200 [thread overview]
Message-ID: <DIA8GVDGR2IK.26SX1558D0KRP@kernel.org> (raw)
In-Reply-To: <20260504045714.59248-1-albabhasan276@gmail.com>
Hi Albab,
On Mon May 4, 2026 at 6:57 AM CEST, Albab Hasan wrote:
> Makes `PhysAddr` a newtype wrapper around `bindings::phys_addr_t`.
> This restricts what operations are possible with physical address
> values, helping prevent mistakes such as mixing them with other
> integer quantities.
>
> Arithmetic operations are intentionally not provided; none of the
> current users perform address arithmetic in Rust.
>
> Suggested-by: Miguel Ojeda <ojeda@kernel.org>
> Link: https://github.com/Rust-for-Linux/linux/issues/1204
> Signed-off-by: Albab Hasan <albabhasan276@gmail.com>
Thanks for the patch; a similar patch [1] has already been submitted slightly
before this one.
May I suggest picking up another issue and / or help reviewing the other patch
in [1]?
Thanks,
Danilo
[1] https://lore.kernel.org/driver-core/20260503103050.200526-1-x@2005.tr/
next prev parent reply other threads:[~2026-05-04 22:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-04 4:57 [PATCH] rust: io: convert `PhysAddr` type alias to newtype Albab Hasan
2026-05-04 22:08 ` Danilo Krummrich [this message]
2026-05-05 9:17 ` Albab Hasan
2026-05-15 16:45 ` kernel test robot
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=DIA8GVDGR2IK.26SX1558D0KRP@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=albabhasan276@gmail.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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.