[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aD73Won8t4jlYYs_@cassiopeiae>
Date: Tue, 3 Jun 2025 15:23:38 +0200
From: Danilo Krummrich <dakr@...nel.org>
To: Igor Korotin <igor.korotin.linux@...il.com>
Cc: Greg KH <gregkh@...uxfoundation.org>,
"Rafael J . Wysocki" <rafael@...nel.org>,
Len Brown <lenb@...nel.org>, 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-acpi@...r.kernel.org, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] rust: acpi: add `acpi::DeviceId` abstraction
On Tue, Jun 03, 2025 at 01:55:47PM +0100, Igor Korotin wrote:
> > Alternatively, if you want to upstream this dependency already you can send the
> > following patches:
> >
> > - this acpi::DeviceId abstraction
> > - the glue code for the generic adapter trait in rust/kernel/driver.rs
> > - use this glue code in the platform abstraction
> > - add acpi support to the platform sample driver
> >
> > This way we can already validate that the code works correctly. All this is
> > required anyways if the I2C device you write a driver for is on the platform
> > bus.
>
> A few questions if I may:
> 1. I committed to 4 different files: `acpi.rs`, `driver.rs`,
> `platform.rs`, platform rust sample driver.
> Should I commit all of this as one commit or split each part to a
> separate commit and send it as a patch sequence?
Every entry of my list above should be a separate commit. It might happen that
writing the glue code for the generic adapter trait in rust/kernel/driver.rs
breaks the build in the platform abstraction, then you have to fix it up in the
same commit, i.e. we never break the build. Please also see [1].
> 2. From author's point of view, as Danilo noticed, `acpi table`
> abstraction code is in general just copy-paste from `of table`
> abstraction code. How should I explicitly mark that fact?
You don't need to do anything specific here. You authored the commit, even
though it's based on existing code.
If you want you can add a note in the commit message that your case is based on
the OF table abstraction. But AFAIC, you don't have to.
[1] https://docs.kernel.org/process/submitting-patches.html#separate-your-changes
Powered by blists - more mailing lists