From: sashiko-bot@kernel.org
To: "Alistair Popple" <apopple@nvidia.com>
Cc: ojeda@kernel.org, "Alexandre Courbot" <acourbot@nvidia.com>,
dri-devel@lists.freedesktop.org,
"Danilo Krummrich" <dakr@kernel.org>
Subject: Re: [PATCH v3 4/7] drm: nova: Add GETPARAM parameter to read the GPU chipid
Date: Thu, 23 Jul 2026 06:41:23 +0000 [thread overview]
Message-ID: <20260723064124.241E01F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260723063046.1265791-5-apopple@nvidia.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Conditional compilation error on 32-bit architectures due to mismatched match arm types.
--
--- Patch [4]: [PATCH v3 4/7] drm: nova: Add GETPARAM parameter to read the GPU chipid ---
commit c560fdc21fe8a1d71109ee27e0b91d35e7283f2a
Author: Alistair Popple <apopple@nvidia.com>
drm: nova: Add GETPARAM parameter to read the GPU chipid
One of the first things a user needs to know about a GPU is its chipid,
so add a GETPARAM parameter to return that.
> diff --git a/drivers/gpu/drm/nova/file.rs b/drivers/gpu/drm/nova/file.rs
> index 1156df51c533a..855f238777349 100644
> --- a/drivers/gpu/drm/nova/file.rs
> +++ b/drivers/gpu/drm/nova/file.rs
[ ... ]
> @@ -43,6 +43,7 @@ pub(crate) fn get_param(
>
> let value = match getparam.param as u32 {
> uapi::NOVA_GETPARAM_VRAM_BAR_SIZE => pdev.resource_len(1)?,
> + uapi::NOVA_GETPARAM_GPU_CHIPID => reg_data.api.chipset() as u64,
[Severity: Low]
Does this cause a conditional compilation error on 32-bit architectures?
In File::get_param(), all match arms must evaluate to exactly the same
type. The first arm evaluates to pdev.resource_len(1)? which returns a
bindings::resource_size_t. The newly added second arm evaluates to u64
via the explicit cast.
On 32-bit kernel configurations without CONFIG_PHYS_ADDR_T_64BIT enabled,
resource_size_t resolves to u32. This mismatch between u32 and u64 across
the match arms will result in a hard build error.
> _ => return Err(EINVAL),
> };
>
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260723063046.1265791-1-apopple@nvidia.com?part=4
next prev parent reply other threads:[~2026-07-23 6:41 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-23 6:30 [PATCH v3 0/7] gpu: nova: Export parameters from nova-core to nova-drm Alistair Popple
2026-07-23 6:30 ` [PATCH v3 1/7] gpu: nova-core: Add public driver API to nova-core Alistair Popple
2026-07-23 6:50 ` sashiko-bot
2026-07-23 6:30 ` [PATCH v3 2/7] drm: nova: Add DRM registration data Alistair Popple
2026-07-23 6:30 ` [PATCH v3 3/7] drm: nova: Add chipid enum to nova-drm UAPI Alistair Popple
[not found] ` <DK7R7PB91GUE.1PS77AQM8ZR99@kernel.org>
2026-07-28 8:00 ` Alistair Popple
2026-07-28 21:29 ` Danilo Krummrich
2026-07-28 21:49 ` John Hubbard
2026-07-28 22:57 ` Danilo Krummrich
2026-07-29 8:24 ` Alistair Popple
2026-07-29 11:22 ` Danilo Krummrich
2026-07-30 1:32 ` John Hubbard
2026-07-23 6:30 ` [PATCH v3 4/7] drm: nova: Add GETPARAM parameter to read the GPU chipid Alistair Popple
2026-07-23 6:41 ` sashiko-bot [this message]
2026-07-23 6:30 ` [PATCH v3 5/7] drm: nova: Add GETPARAM parameter to read usable VRAM size Alistair Popple
2026-07-23 6:30 ` [PATCH v3 6/7] drm: nova: Use nova-core to read VRAM_BAR_SIZE parameter Alistair Popple
2026-07-23 6:30 ` [PATCH v3 7/7] drm: nova: Expose a render node Alistair Popple
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=20260723064124.241E01F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=acourbot@nvidia.com \
--cc=apopple@nvidia.com \
--cc=dakr@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=ojeda@kernel.org \
--cc=sashiko-reviews@lists.linux.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