[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024101256-amplifier-joylessly-6ca9@gregkh>
Date: Sat, 12 Oct 2024 09:29:32 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Josef Zoller <josef@...terzollerpiano.com>
Cc: Arnd Bergmann <arnd@...db.de>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Benno Lossin <benno.lossin@...ton.me>,
Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org
Subject: Re: [PATCH 0/3] Character device abstractions for Rust
On Fri, Oct 11, 2024 at 08:55:41PM +0200, Josef Zoller wrote:
> Writing character devices is a common way to start writing kernel code,
> especially because of the book "Linux Device Drivers", which is still
> one of the best resources to learn about Linux kernel programming. To
> allow an easier entry into Rust kernel programming specifically, this
> series adds abstractions for these kinds of devices to the Rust API.
I understand this, but if at all possible, I would prefer that people
stick to using the misc char device interface instead. It's much
simpler and integrates better into the overall system (handles sysfs for
you automatically, etc.)
I've already merged the misc device rust bindings into my tree, so why
not just stick with them?
> I also included a sample that demonstrates how to use these abstractions
> to create the simplest example from LDD3, the "scull" device.
This is great, but why not just provide the scull example using misc
device?
> I'm also aware of the patch series about misc devices that was sent
> recently. I think these are both valuable additions to the Rust API, and
> could even be combined in some way, in which case the file operations
> abstractions in both series should probably be separated and
> generalized. But I'm still sending this series as it is, because it is
> my first ever patch and I could use some feedback on my approach.
That's great, but I'd prefer to stick with the misc code for now until
someone really really really proves that they want a "raw" char
interface.
thanks,
greg k-h
Powered by blists - more mailing lists