From: "Gary Guo" <gary@garyguo.net>
To: "Danilo Krummrich" <dakr@kernel.org>,
<gregkh@linuxfoundation.org>, <rafael@kernel.org>,
<johan@kernel.org>, <david.m.ertman@intel.com>,
<iweiny@kernel.org>, <leon@kernel.org>, <ojeda@kernel.org>,
<boqun@kernel.org>, <gary@garyguo.net>,
<bjorn3_gh@protonmail.com>, <lossin@kernel.org>,
<a.hindborg@kernel.org>, <aliceryhl@google.com>,
<tmgross@umich.edu>, <daniel.almeida@collabora.com>,
<tamird@kernel.org>, <acourbot@nvidia.com>, <work@onurozkan.dev>,
<igor.korotin@linux.dev>, <bhelgaas@google.com>,
<kwilczynski@kernel.org>, <markus.probst@posteo.de>
Cc: <driver-core@lists.linux.dev>, <rust-for-linux@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,
<linux-serial@vger.kernel.org>, <linux-usb@vger.kernel.org>
Subject: Re: [PATCH 0/7] rust: treewide: remove driver unbind callbacks
Date: Thu, 12 Nov 2026 09:47:17 +0000 [thread overview]
Message-ID: <DMT4Y6N50BGG.3IEM84MO461ZY@garyguo.net> (raw)
In-Reply-To: <20261112005455.1224352-1-dakr@kernel.org>
On Thu Nov 12, 2026 at 12:52 AM GMT, Danilo Krummrich wrote:
> The driver model uses native Rust lifetimes, allowing driver data to
> retain device resources and a bound device reference for use in its
> destructor. Separate teardown callbacks are therefore no longer needed.
>
> Remove unbind() from the PCI, platform, auxiliary, serdev and I2C driver
> traits, and disconnect() from the USB driver trait. Move the affected
> sample teardown into destructors and update the driver documentation.
unbind() has the `Device<Core>` state, which the destructor won't be able to
get. Are we sure we won't need it in the future?
Best,
Gary
>
> Danilo Krummrich (7):
> rust: pci: remove the unbind() callback
> rust: platform: remove the unbind() callback
> rust: auxiliary: remove the unbind() callback
> rust: serdev: remove the unbind() callback
> rust: i2c: remove the unbind() callback
> rust: usb: remove the disconnect() callback
> rust: driver: document teardown through destructors
>
> rust/kernel/auxiliary.rs | 34 ++++-----------------------
> rust/kernel/driver.rs | 18 ++++++---------
> rust/kernel/i2c.rs | 31 ++++---------------------
> rust/kernel/pci.rs | 34 ++++-----------------------
> rust/kernel/platform.rs | 34 ++++-----------------------
> rust/kernel/serdev.rs | 41 ++++-----------------------------
> rust/kernel/usb.rs | 36 +++++------------------------
> samples/rust/rust_driver_i2c.rs | 18 ++++++++++-----
> samples/rust/rust_driver_pci.rs | 7 ++----
> samples/rust/rust_driver_usb.rs | 11 +++++----
> samples/rust/rust_i2c_client.rs | 12 +++++-----
> 11 files changed, 59 insertions(+), 217 deletions(-)
>
>
> base-commit: de7625abe4e92f1fb0047ed5f163b2ecaba77e50
prev parent reply other threads:[~2026-11-12 9:47 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 0:52 Danilo Krummrich
2026-11-12 0:52 ` [PATCH 1/7] rust: pci: remove the unbind() callback Danilo Krummrich
2026-11-12 0:52 ` [PATCH 2/7] rust: platform: " Danilo Krummrich
2026-11-12 0:52 ` [PATCH 3/7] rust: auxiliary: " Danilo Krummrich
2026-11-12 0:52 ` [PATCH 4/7] rust: serdev: " Danilo Krummrich
2026-11-12 0:52 ` [PATCH 5/7] rust: i2c: " Danilo Krummrich
2026-11-12 0:53 ` [PATCH 6/7] rust: usb: remove the disconnect() callback Danilo Krummrich
2026-11-12 0:53 ` [PATCH 7/7] rust: driver: document teardown through destructors Danilo Krummrich
2026-11-12 9:47 ` Gary Guo [this message]
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=DMT4Y6N50BGG.3IEM84MO461ZY@garyguo.net \
--to=gary@garyguo.net \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bhelgaas@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=david.m.ertman@intel.com \
--cc=driver-core@lists.linux.dev \
--cc=gregkh@linuxfoundation.org \
--cc=igor.korotin@linux.dev \
--cc=iweiny@kernel.org \
--cc=johan@kernel.org \
--cc=kwilczynski@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=markus.probst@posteo.de \
--cc=ojeda@kernel.org \
--cc=rafael@kernel.org \
--cc=rust-for-linux@vger.kernel.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®