Re: [PATCH 1/2] rust: pci: remove TryFrom<&Device> implementation for &pci::Device
From: Nicolás Antinori
Date: Mon Oct 19 2026 - 15:35:09 EST
Hello,
On Mon Oct 19, 2026 at 1:13 PM -03, Nicolás Antinori wrote:
> Remove the `TryFrom<&device::Device<Ctx>>` implementation for
> `&Device<Ctx>` since it has no remaining users.
>
> Fixes: 7edc491f6fca ("drm: nova: Use nova-core to read VRAM_BAR_SIZE parameter")
> Reported-by: Georgios Androutsopoulos <georgeandrout13@xxxxxxxxx>
> Closes: https://github.com/Rust-for-Linux/linux/issues/1264
> Signed-off-by: Nicolás Antinori <nico.antinori.7@xxxxxxxxx>
I got two reviews from Sashiko [1]
> [Severity: Low]
> Does removing this TryFrom implementation break the build when
> CONFIG_DRM_NOVA is enabled?
>
> The commit message references commit 7edc491f6fca ("drm: nova: Use
> nova-core to read VRAM_BAR_SIZE parameter"), which is not present in
> this baseline branch. Without that commit applied first, File::get_param()
> in drivers/gpu/drm/nova/file.rs still relies on this conversion:
This is true for the rust-next branch in the R4L tree, but the named
commit is present in linux-next [2] and drm-rust-next [3], and the patch
application and compilation were tested in those too.
I am pretty sure the patches were created based on the master branch of
linux-next tree (because of the discussion in [4]).
> [Severity: Low]
> Since TryFrom::try_from() was the only caller of bindings::dev_is_pci(),
> should rust_helper_dev_is_pci() in rust/helpers/pci.c also be removed
> along with it?
I didn't see this. I apologize for the oversight. I can send a separate
patch or a v2 of this patch alone, since the patches of the series are
related but can be applied independently.
Best regards,
Nicolás
[1] https://sashiko.dev/#/patchset/cover.1792417858.git.nico.antinori.7@xxxxxxxxx?part=1
[2] https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=7edc491f6fca8e22f51e37a16d74914cd959274d
[3] https://gitlab.freedesktop.org/drm/rust/kernel/-/commit/7edc491f6fca8e22f51e37a16d74914cd959274d
[4] https://github.com/Rust-for-Linux/linux/issues/1264#issuecomment-6194695910