mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Probst <markus.probst@posteo.de>
To: Danilo Krummrich <dakr@kernel.org>, Gary Guo <gary@garyguo.net>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Rob Herring" <robh@kernel.org>,
	"Jiri Slaby" <jirislaby@kernel.org>,
	"Miguel Ojeda" <ojeda@kernel.org>,
	"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
	"Benno Lossin" <lossin@kernel.org>,
	"Andreas Hindborg" <a.hindborg@kernel.org>,
	"Alice Ryhl" <aliceryhl@google.com>,
	"Trevor Gross" <tmgross@umich.edu>,
	"Kari Argillander" <kari.argillander@gmail.com>,
	"Rafael J. Wysocki" <rafael@kernel.org>,
	"Viresh Kumar" <viresh.kumar@linaro.org>,
	"Boqun Feng" <boqun@kernel.org>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Daniel Almeida" <daniel.almeida@collabora.com>,
	"Tamir Duberstein" <tamird@kernel.org>,
	"Alexandre Courbot" <acourbot@nvidia.com>,
	"Onur Özkan" <work@onurozkan.dev>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	rust-for-linux@vger.kernel.org, linux-pm@vger.kernel.org,
	driver-core@lists.linux.dev, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v14 0/3] rust: add basic serial device bus abstractions
Date: Fri, 17 Jul 2026 12:44:30 +0000	[thread overview]
Message-ID: <1eccdade507cfae491f7499de9dd456e749b32a5.camel@posteo.de> (raw)
In-Reply-To: <DK0UB4AMYUM9.4T90577F6VAI@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 2387 bytes --]

On Fri, 2026-07-17 at 14:20 +0200, Danilo Krummrich wrote:
> diff --git a/rust/kernel/serdev.rs b/rust/kernel/serdev.rs
> index 0ffcef1849d2..a1161dd9f37f 100644
> --- a/rust/kernel/serdev.rs
> +++ b/rust/kernel/serdev.rs
> @@ -174,7 +174,8 @@ extern "C" fn probe_callback(sdev: *mut bindings::serdev_device) -> kernel::ffi:
>          //
>          // INVARIANT: `sdev` is valid for the duration of `probe_callback()`.
>          let sdev = unsafe { &*sdev.cast::<Device<device::CoreInternal<'_>>>() };
> -        let info = <Self as driver::Adapter>::id_info(sdev.as_ref());
> +        // SAFETY: `sdev` has been matched by the serial device bus via its device ID table.
> +        let info = unsafe { <Self as driver::Adapter>::id_info(sdev.as_ref()) };
> 
>          from_result(|| {
>              sdev.as_ref().set_drvdata(try_pin_init!(PrivateData::<T> {
> @@ -334,7 +335,6 @@ macro_rules! module_serdev_device_driver {
>  ///
>  /// kernel::of_device_table!(
>  ///     OF_TABLE,
> -///     MODULE_OF_TABLE,
>  ///     <MyDriver as serdev::Driver>::IdInfo,
>  ///     [
>  ///         (of::DeviceId::new(c"test,device"), ())
> @@ -343,7 +343,6 @@ macro_rules! module_serdev_device_driver {
>  ///
>  /// kernel::acpi_device_table!(
>  ///     ACPI_TABLE,
> -///     MODULE_ACPI_TABLE,
>  ///     <MyDriver as serdev::Driver>::IdInfo,
>  ///     [
>  ///         (acpi::DeviceId::new(c"LNUXBEEF"), ())
> diff --git a/samples/rust/rust_driver_serdev.rs b/samples/rust/rust_driver_serdev.rs
> index a12b1412db30..51b4898cd855 100644
> --- a/samples/rust/rust_driver_serdev.rs
> +++ b/samples/rust/rust_driver_serdev.rs
> @@ -20,14 +20,12 @@ struct SampleDriver {
> 
>  kernel::of_device_table!(
>      OF_TABLE,
> -    MODULE_OF_TABLE,
>      <SampleDriver as serdev::Driver>::IdInfo,
>      [(of::DeviceId::new(c"test,rust_driver_serdev"), ())]
>  );
> 
>  kernel::acpi_device_table!(
>      ACPI_TABLE,
> -    MODULE_ACPI_TABLE,
>      <SampleDriver as serdev::Driver>::IdInfo,
>      [(acpi::DeviceId::new(c"LNUXBEEF"), ())]
>  );
Not sure if necessary for a conflict resolution, but

Reviewed-by: Markus Probst <markus.probst@posteo.de>

Thanks
- Markus Probst


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 870 bytes --]

  reply	other threads:[~2026-07-17 12:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 21:00 Markus Probst
2026-07-15 21:00 ` [PATCH v14 1/3] " Markus Probst
2026-07-17 11:15   ` Gary Guo
2026-07-17 11:27     ` Markus Probst
2026-07-15 21:00 ` [PATCH v14 2/3] samples: rust: add Rust serial device bus sample device driver Markus Probst
2026-07-15 21:00 ` [PATCH v14 3/3] MAINTAINERS: serdev: Add self for serdev Markus Probst
2026-07-17 10:55 ` [PATCH v14 0/3] rust: add basic serial device bus abstractions Greg Kroah-Hartman
2026-07-17 11:14   ` Markus Probst
2026-07-17 11:22     ` Danilo Krummrich
2026-07-17 12:03       ` Greg Kroah-Hartman
2026-07-17 12:07         ` Gary Guo
2026-07-17 12:20           ` Danilo Krummrich
2026-07-17 12:44             ` Markus Probst [this message]
2026-07-17 12:07         ` Danilo Krummrich
2026-07-17 13:12           ` Greg Kroah-Hartman
2026-07-17 13:18             ` Danilo Krummrich
2026-07-17 11:19   ` Danilo Krummrich

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=1eccdade507cfae491f7499de9dd456e749b32a5.camel@posteo.de \
    --to=markus.probst@posteo.de \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=driver-core@lists.linux.dev \
    --cc=gary@garyguo.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=kari.argillander@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=lossin@kernel.org \
    --cc=ojeda@kernel.org \
    --cc=rafael@kernel.org \
    --cc=robh@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=viresh.kumar@linaro.org \
    --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®