From: sashiko-bot@kernel.org
To: "Zhi Wang" <zhiw@nvidia.com>
Cc: linux-pci@vger.kernel.org, ojeda@kernel.org
Subject: Re: [PATCH v6 1/1] rust: pci: add extended capability and SR-IOV support
Date: Thu, 30 Jul 2026 18:39:13 +0000 [thread overview]
Message-ID: <20260730183913.B00061F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260730182954.783568-2-zhiw@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing `#[inline]` attribute on the `ExtCapId::as_raw` abstraction function.
--
--- Patch [1]: [PATCH v6 1/1] rust: pci: add extended capability and SR-IOV support ---
commit 69f27ed67b8e8dbe83e8e431269f12c739076818
Author: Zhi Wang <zhiw@nvidia.com>
Subject: rust: pci: add extended capability and SR-IOV support
This commit adds support for locating and projecting PCIe extended capabilities
in the Rust PCI abstraction. It defines a typed layout for the SR-IOV extended
capability and adds helpers to decode VF BARs.
Link: https://lore.kernel.org/rust-for-linux/20260730180349.771719-1-zhiw@nvidia.com/
> diff --git a/rust/kernel/pci/cap.rs b/rust/kernel/pci/cap.rs
> new file mode 100644
> index 0000000000000..08c044bedb706
> --- /dev/null
> +++ b/rust/kernel/pci/cap.rs
[ ... ]
> +/// PCI extended capability IDs.
> +#[repr(u16)]
> +#[derive(Debug, Clone, Copy, PartialEq, Eq)]
> +pub enum ExtCapId {
> + /// Single Root I/O Virtualization.
> + // CAST: `PCI_EXT_CAP_ID_SRIOV` is `0x10`, which fits in `u16`.
> + Sriov = bindings::PCI_EXT_CAP_ID_SRIOV as u16,
> +}
> +
> +impl ExtCapId {
> + fn as_raw(self) -> u16 {
> + self as u16
> + }
> +}
[Severity: Low]
This isn't a bug, but should this function be annotated with #[inline]?
The Rust subsystem guidelines specify that small functions or functions
forwarding to a binding call within abstractions should be annotated with
#[inline].
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260730182954.783568-2-zhiw@nvidia.com?part=1
next prev parent reply other threads:[~2026-07-30 18:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 18:29 [PATCH v6 0/1] Rust PCI capability infrastructure and SR-IOV support Zhi Wang
2026-07-30 18:29 ` [PATCH v6 1/1] rust: pci: add extended capability " Zhi Wang
2026-07-30 18:39 ` sashiko-bot [this message]
2026-07-30 18:45 ` Gary Guo
2026-07-31 9:32 ` Zhi Wang
2026-07-31 9:57 ` Alexandre Courbot
2026-07-31 12:38 ` Gary Guo
2026-07-31 12:52 ` Alexandre Courbot
2026-07-31 10:35 ` 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=20260730183913.B00061F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=zhiw@nvidia.com \
/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