From: "Danilo Krummrich" <dakr@kernel.org>
To: "Markus Probst" <markus.probst@posteo.de>
Cc: "Rob Herring" <robh@kernel.org>,
"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun.feng@gmail.com>,
"Gary Guo" <gary@garyguo.net>,
"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>,
linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
rust-for-linux@vger.kernel.org
Subject: Re: [PATCH RFC 1/4] serdev: Export internal is_serdev_device() for drivers
Date: Sun, 21 Dec 2025 18:40:34 +0100 [thread overview]
Message-ID: <DF42UYA8RLDW.GSZ9G1CC03R8@kernel.org> (raw)
In-Reply-To: <20251220-rust_serdev-v1-1-e44645767621@posteo.de>
On Sat Dec 20, 2025 at 7:44 PM CET, Markus Probst wrote:
> diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
> index b33e708cb245..1f6bf8e826d8 100644
> --- a/drivers/tty/serdev/core.c
> +++ b/drivers/tty/serdev/core.c
> @@ -69,10 +69,11 @@ static const struct device_type serdev_device_type = {
> .release = serdev_device_release,
> };
>
> -static bool is_serdev_device(const struct device *dev)
> +bool is_serdev_device(const struct device *dev)
> {
> return dev->type == &serdev_device_type;
> }
> +EXPORT_SYMBOL_GPL(is_serdev_device);
>
> static void serdev_ctrl_release(struct device *dev)
> {
> diff --git a/include/linux/serdev.h b/include/linux/serdev.h
> index 34562eb99931..0043b6cc6d01 100644
> --- a/include/linux/serdev.h
> +++ b/include/linux/serdev.h
> @@ -116,6 +116,8 @@ static inline struct serdev_controller *to_serdev_controller(struct device *d)
> return container_of(d, struct serdev_controller, dev);
> }
>
> +bool is_serdev_device(const struct device *dev);
> +
> static inline void *serdev_device_get_drvdata(const struct serdev_device *serdev)
> {
> return dev_get_drvdata(&serdev->dev);
Besides what I mentioned in [1] (which should make the patch obsolete anyways),
I want to point out that such cases should be solved with a helper in
rust/helpers/ instead.
[1] https://lore.kernel.org/lkml/DF42RR0I52L3.1JET4R0KFDPPH@kernel.org/
next prev parent reply other threads:[~2025-12-21 17:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-20 18:44 [PATCH RFC 0/4] rust: add basic serial device bus abstractions Markus Probst
2025-12-20 18:44 ` [PATCH RFC 1/4] serdev: Export internal is_serdev_device() for drivers Markus Probst
2025-12-21 16:10 ` Greg Kroah-Hartman
2025-12-21 16:28 ` Markus Probst
2025-12-21 16:46 ` Greg Kroah-Hartman
2025-12-21 17:36 ` Danilo Krummrich
2025-12-21 17:40 ` Danilo Krummrich [this message]
2025-12-20 18:44 ` [PATCH RFC 2/4] rust: add basic serial device bus abstractions Markus Probst
2025-12-21 9:19 ` Dirk Behme
2025-12-21 12:41 ` Markus Probst
2025-12-25 15:13 ` Kari Argillander
2026-01-13 16:15 ` Markus Probst
2026-01-13 17:37 ` Danilo Krummrich
2026-01-13 17:59 ` Markus Probst
2026-01-13 19:10 ` Danilo Krummrich
2026-02-08 14:30 ` Markus Probst
2025-12-26 15:09 ` Kari Argillander
2025-12-20 18:44 ` [PATCH RFC 3/4] samples: rust: add Rust serial device bus sample device driver Markus Probst
2025-12-21 9:11 ` Dirk Behme
2025-12-21 12:39 ` Markus Probst
2025-12-24 0:10 ` kernel test robot
2025-12-20 18:44 ` [PATCH RFC 4/4] rust: Add serdev rust abstractions to MAINTAINERS file Markus Probst
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=DF42UYA8RLDW.GSZ9G1CC03R8@kernel.org \
--to=dakr@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun.feng@gmail.com \
--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-serial@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=markus.probst@posteo.de \
--cc=ojeda@kernel.org \
--cc=robh@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tmgross@umich.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.