From: "Danilo Krummrich" <dakr@kernel.org>
To: "Alexandre Courbot" <acourbot@nvidia.com>
Cc: "Eliot Courtney" <ecourtney@nvidia.com>,
"Gary Guo" <gary@garyguo.net>,
"Alice Ryhl" <aliceryhl@google.com>,
"David Airlie" <airlied@gmail.com>,
"Simona Vetter" <simona@ffwll.ch>,
"Alistair Popple" <apopple@nvidia.com>,
<nouveau@lists.freedesktop.org>, <rust-for-linux@vger.kernel.org>,
<dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>,
"dri-devel" <dri-devel-bounces@lists.freedesktop.org>
Subject: Re: [PATCH v2 2/4] gpu: nova-core: gsp: clarify comments about invariants and pointer roles
Date: Wed, 28 Jan 2026 11:46:59 +0100 [thread overview]
Message-ID: <DG05UZS433N1.378WELIDPRZVE@kernel.org> (raw)
In-Reply-To: <DG02OBNM1OPY.2W9JKV0IF8VPK@nvidia.com>
On Wed Jan 28, 2026 at 9:17 AM CET, Alexandre Courbot wrote:
> On Wed Jan 28, 2026 at 1:35 PM JST, Eliot Courtney wrote:
>> On Tue Jan 27, 2026 at 3:04 AM JST, Gary Guo wrote:
>>> I wonder if this can be `is within 0..MSGQ_NUM_PAGES`. What do others think?
>>
>> I think this is very reasonable, since this is part of the rust
>> range syntax so it should be understandable. I also considered the
>> mathematical syntax `[0, MSGQ_NUM_PAGES)`, but not sure if this would
>> be conventional - it does seem that this notation is used in a bunch
>> of places though. Will apply your suggestion in the next version unless
>> there is a definitive convention for this.
>
> Since this is Rust code, the Rust syntax to express ranges (within ``
> quotes) makes sense IMHO.
While I really like the mathematical syntax, I think using the Rust syntax is
superior, as it requires zero mental cycles to translate it to what is likely to
be found in the code as well.
(There also have been some considerations of using tools to validate safety
comments or invariants to some extend eventually.)
next prev parent reply other threads:[~2026-01-28 10:47 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-23 12:12 [PATCH v2 0/4] gpu: nova-core: gsp: fix command queue ring buffer bugs Eliot Courtney
2026-01-23 12:12 ` [PATCH v2 1/4] gpu: nova-core: gsp: fix incorrect advancing of write pointer Eliot Courtney
2026-01-23 12:12 ` [PATCH v2 2/4] gpu: nova-core: gsp: clarify comments about invariants and pointer roles Eliot Courtney
2026-01-26 18:04 ` Gary Guo
2026-01-28 4:35 ` Eliot Courtney
2026-01-28 8:17 ` Alexandre Courbot
2026-01-28 10:46 ` Danilo Krummrich [this message]
2026-01-23 12:12 ` [PATCH v2 3/4] gpu: nova-core: gsp: fix improper handling of empty slot in cmdq Eliot Courtney
2026-01-26 18:26 ` Gary Guo
2026-01-28 11:42 ` Alexandre Courbot
2026-01-28 11:39 ` Alexandre Courbot
2026-01-23 12:12 ` [PATCH v2 4/4] gpu: nova-core: gsp: fix improper indexing in driver_read_area Eliot Courtney
2026-01-26 18:30 ` Gary Guo
2026-01-28 12:18 ` Alexandre Courbot
2026-01-28 11:57 ` Alexandre Courbot
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=DG05UZS433N1.378WELIDPRZVE@kernel.org \
--to=dakr@kernel.org \
--cc=acourbot@nvidia.com \
--cc=airlied@gmail.com \
--cc=aliceryhl@google.com \
--cc=apopple@nvidia.com \
--cc=dri-devel-bounces@lists.freedesktop.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ecourtney@nvidia.com \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nouveau@lists.freedesktop.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=simona@ffwll.ch \
/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