Re: [PATCH] rust: acpi: add `acpi::DeviceId` abstraction

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]
  Powered by Linux