public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Aditya Rajan" <adi.dev.github@gmail.com>
To: "Gary Guo" <gary@garyguo.net>,
	"Aditya Rajan" <adi.dev.github@gmail.com>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Danilo Krummrich" <dakr@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Nicolas Schier" <nsc@kernel.org>
Cc: <rust-for-linux@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-kbuild@vger.kernel.org>
Subject: Re: [PATCH v2 1/2] rust: add projection infrastructure
Date: Sun, 01 Mar 2026 20:41:42 -0800	[thread overview]
Message-ID: <DGS0RADS6WDW.3L4MGITVFJRJI@gmail.com> (raw)
In-Reply-To: <DGRGYFHZF7PF.1Q3MZ7C1SBRL7@garyguo.net>

On Sun Mar 1, 2026 at 5:10 AM PST, Gary Guo wrote:
> On Sat Feb 28, 2026 at 11:38 PM GMT, Aditya Rajan wrote:
>> On Thu Feb 26, 2026 at 7:46 AM PST, Gary Guo wrote:
>
> Good catch!
>
> The code below
>
>     if self.end > slice.len() {
>         return None;
>     }
>
> is rightfully `>` as it's okay to have end being equal to the length. I suppose
> this is what you mean by "somewhere else in the code"?

Yes the second check which i was referring belongs to `core::ops::Range<usize>`, I agree with you
it makes sense for `Range`.

> This one though should indeed be `>=`, and I've obviously messed this one up.

Patch looks good to me once this is fixed for `usize` :)

Thanks
Aditya

  reply	other threads:[~2026-03-02  4:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20260226154656.3241736-1-gary@kernel.org>
2026-02-26 15:46 ` [PATCH v2 1/2] rust: add projection infrastructure Gary Guo
2026-02-28 23:38   ` Aditya Rajan
2026-03-01 13:10     ` Gary Guo
2026-03-02  4:41       ` Aditya Rajan [this message]
2026-02-26 15:46 ` [PATCH v2 2/2] rust: dma: use pointer projection infra for `dma_{read,write}` macro Gary Guo

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=DGS0RADS6WDW.3L4MGITVFJRJI@gmail.com \
    --to=adi.dev.github@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=gary@garyguo.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=nathan@kernel.org \
    --cc=nsc@kernel.org \
    --cc=ojeda@kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox