[PATCH 0/2] remove TryFrom<&Device> implementation for pci and platform

From: Nicolás Antinori

Date: Mon Oct 19 2026 - 15:59:19 EST


Hello,

This patch series removes `TryFrom<&Device<Ctx>>` implementations for
pci and platform's `Device` struct.

To make sure that there were no remaining users, I checked for usages of
the `try_from` method and the structs implementing `TryFrom` using rust
analyzer, activated the modules that were using the structs, removed the
implementation and compiled the kernel (did not trust entirely in rust
analyzer because it does not find usages that depend on this
implementation like the `try_into()` in fact, the last usage of the
trait was a `try_into()` in pci).

I did what I described above from the most recent changes (rust-next,
linux-next, drm-rust-next) down to the introduction of the
implementation, stopping in all major versions (7.3-rc7 to 6.19) to find
the last usage and mark the commit in the `Fixes:` tag. I found no
usages for the platform implementation.

If applied to current rust-next, commit 7c306f00835a ("rust: zerocopy:
update to v0.8.62"), nova driver will fail to build, drm-rust-next and
linux-next are ok.

This series, along with the i2c patch [1], closes:
https://github.com/Rust-for-Linux/linux/issues/1264

I made this a series because both TryFrom implementations were
introduced in a series:
https://lore.kernel.org/all/20250321214826.140946-1-dakr@xxxxxxxxxx/

[1] https://lore.kernel.org/rust-for-linux/20261019152329.620610-1-nico.antinori.7@xxxxxxxxx/T/#u

Best regards,
Nicolás

Nicolás Antinori (2):
rust: pci: remove TryFrom<&Device> implementation for &pci::Device
rust: platform: remove TryFrom<&Device> implementation for
&platform::Device

rust/kernel/pci.rs | 21 ---------------------
rust/kernel/platform.rs | 21 ---------------------
2 files changed, 42 deletions(-)

--
2.47.3