From: ai qubits <aiqubits@hotmail.com>
To: Gary Guo <gary@garyguo.net>,
Sophon Zhang via B4 Relay
<devnull+aiqubits.hotmail.com@kernel.org>
Cc: "Alexandre Courbot" <acourbot@nvidia.com>,
"Danilo Krummrich" <dakr@kernel.org>,
"Bjorn Helgaas" <bhelgaas@google.com>,
"Krzysztof Wilczyński" <kwilczynski@kernel.org>,
"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>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Onur Özkan" <work@onurozkan.dev>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"rust-for-linux@vger.kernel.org" <rust-for-linux@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: 回复: 回复: [PATCH v4] rust: pci: reject IRQ vector indices that do not fit in u32
Date: Tue, 1 Sep 2026 12:35:50 +0000 [thread overview]
Message-ID: <SN7PR07MB97080BDF4ED89ADB6F43194ACFA82@SN7PR07MB9708.namprd07.prod.outlook.com> (raw)
In-Reply-To: <DL3YTUU7W86I.29BD41EC3XI9V@garyguo.net>
Thanks for pointing this out, Gary. I will optimize these email responses in future emails.
Best regards,
Sophon
________________________________________
发件人: Gary Guo <gary@garyguo.net>
发送时间: 2026年9月1日 20:06
收件人: ai qubits; Alexandre Courbot; Sophon Zhang via B4 Relay
抄送: Danilo Krummrich; Bjorn Helgaas; Krzysztof Wilczyński; Miguel Ojeda; Boqun Feng; Gary Guo; Björn Roy Baron; Benno Lossin; Andreas Hindborg; Alice Ryhl; Trevor Gross; Daniel Almeida; Tamir Duberstein; Onur Özkan; linux-pci@vger.kernel.org; rust-for-linux@vger.kernel.org; linux-kernel@vger.kernel.org
主题: Re: 回复: [PATCH v4] rust: pci: reject IRQ vector indices that do not fit in u32
On Tue Sep 1, 2026 at 12:47 PM BST, ai qubits wrote:
> Thanks for the question, Alexandre, and for the clarification, Danilo.
>
> I agree that usize is the more appropriate type for an index-oriented
> Rust API. Callers are likely to obtain indices from ranges, iterators, or
> other Rust indexing operations, which naturally use usize.
>
> The unsigned int expected by pci_irq_vector() is an implementation detail
> of the C interface, so the necessary validation and conversion should
> remain inside the Rust abstraction rather than being exposed to callers.
>
> I will therefore keep IrqVectorRegistration::index() accepting usize and
> handle the C API boundary internally.
>
> Best regards,
> Sophon
Hi Sophon,
Please avoid top-posting. See
https://subspace.kernel.org/etiquette.html#do-not-top-post-when-replying (and
rest of that page, too).
Also, your email contains byte order marks (FEFF). Not sure what clients are you
using, but please pick a proper one for plain text mails.
Thanks,
Gary
next prev parent reply other threads:[~2026-09-01 12:35 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-31 17:09 [PATCH v4] rust: pci: reject IRQ vector indices that do not fit in u32 Sophon Zhang via B4 Relay
2026-09-01 10:58 ` Alexandre Courbot
2026-09-01 11:08 ` Danilo Krummrich
2026-09-01 13:32 ` Alexandre Courbot
2026-09-01 13:36 ` Danilo Krummrich
2026-09-01 13:52 ` Alexandre Courbot
2026-09-01 13:48 ` Gary Guo
2026-09-01 14:08 ` Alexandre Courbot
2026-09-01 15:58 ` 回复: " ai qubits
2026-09-01 11:47 ` ai qubits
2026-09-01 12:06 ` Gary Guo
2026-09-01 12:35 ` ai qubits [this message]
2026-09-01 12:42 ` Miguel Ojeda
2026-09-01 16:19 ` Gary Guo
2026-09-01 16:31 ` Danilo Krummrich
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=SN7PR07MB97080BDF4ED89ADB6F43194ACFA82@SN7PR07MB9708.namprd07.prod.outlook.com \
--to=aiqubits@hotmail.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=devnull+aiqubits.hotmail.com@kernel.org \
--cc=gary@garyguo.net \
--cc=kwilczynski@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox