Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH 0/2] remove TryFrom<&Device> implementation for pci and platform
@ 2026-10-19 16:13 Nicolás Antinori
  2026-10-19 16:13 ` [PATCH 1/2] rust: pci: remove TryFrom<&Device> implementation for &pci::Device Nicolás Antinori
  2026-10-19 16:13 ` [PATCH 2/2] rust: platform: remove TryFrom<&Device> implementation for &platform::Device Nicolás Antinori
  0 siblings, 2 replies; 4+ messages in thread
From: Nicolás Antinori @ 2026-10-19 16:13 UTC (permalink / raw)
  To: Danilo Krummrich, Georgios Androutsopoulos
  Cc: Nicolás Antinori, Alexandre Courbot, Alice Ryhl,
	Andreas Hindborg, Benno Lossin, Björn Roy Baron, Boqun Feng,
	Brigham Campbell, Daniel Almeida, Gary Guo, Jori Koolstra,
	Miguel Ojeda, Onur Özkan, Shuah Khan, Tamir Duberstein,
	Trevor Gross, linux-kernel, rust-for-linux, linux-kernel-mentees

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@kernel.org/

[1] https://lore.kernel.org/rust-for-linux/20261019152329.620610-1-nico.antinori.7@gmail.com/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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-19 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 16:13 [PATCH 0/2] remove TryFrom<&Device> implementation for pci and platform Nicolás Antinori
2026-10-19 16:13 ` [PATCH 1/2] rust: pci: remove TryFrom<&Device> implementation for &pci::Device Nicolás Antinori
2026-10-19 18:24   ` Nicolás Antinori
2026-10-19 16:13 ` [PATCH 2/2] rust: platform: remove TryFrom<&Device> implementation for &platform::Device Nicolás Antinori

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox