mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nicolás Antinori" <nico.antinori.7@gmail.com>
To: Danilo Krummrich <dakr@kernel.org>,
	Georgios Androutsopoulos <georgeandrout13@gmail.com>
Cc: "Nicolás Antinori" <nico.antinori.7@gmail.com>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Benno Lossin" <lossin@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Boqun Feng" <boqun@kernel.org>,
	"Brigham Campbell" <me@brighamcampbell.com>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Gary Guo" <gary@garyguo.net>,
	"Jori Koolstra" <jkoolstra@xs4all.nl>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Onur Özkan" <work@onurozkan.dev>,
	"Shuah Khan" <skhan@linuxfoundation.org>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Trevor Gross" <tmgross@umich.edu>,
	linux-kernel@vger.kernel.org, rust-for-linux@vger.kernel.org,
	linux-kernel-mentees@lists.linux.dev
Subject: [PATCH 0/2] remove TryFrom<&Device> implementation for pci and platform
Date: Mon, 19 Oct 2026 13:13:36 -0300	[thread overview]
Message-ID: <cover.1792417858.git.nico.antinori.7@gmail.com> (raw)

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


             reply	other threads:[~2026-10-19 16:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-19 16:13 Nicolás Antinori [this message]
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

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=cover.1792417858.git.nico.antinori.7@gmail.com \
    --to=nico.antinori.7@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=gary@garyguo.net \
    --cc=georgeandrout13@gmail.com \
    --cc=jkoolstra@xs4all.nl \
    --cc=linux-kernel-mentees@lists.linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=me@brighamcampbell.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.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

all inboxes | Powered by JetHome®