<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/rust/kernel/acpi.rs, branch v6.18.21</title>
<subtitle>Clone of https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git</subtitle>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/'/>
<entry>
<title>rust: acpi: use `core::ffi::CStr` method names</title>
<updated>2025-09-16T07:26:59+00:00</updated>
<author>
<name>Tamir Duberstein</name>
<email>tamird@gmail.com</email>
</author>
<published>2025-08-13T15:42:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=657403637f7d343352efb29b53d9f92dcf86aebb'/>
<id>657403637f7d343352efb29b53d9f92dcf86aebb</id>
<content type='text'>
Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoid methods that only exist on the latter.

Signed-off-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Reviewed-by: Benno Lossin &lt;lossin@kernel.org&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Prepare for `core::ffi::CStr` taking the place of `kernel::str::CStr` by
avoid methods that only exist on the latter.

Signed-off-by: Tamir Duberstein &lt;tamird@gmail.com&gt;
Reviewed-by: Benno Lossin &lt;lossin@kernel.org&gt;
Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust: device_id: split out index support into a separate trait</title>
<updated>2025-07-16T21:38:21+00:00</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@gmail.com</email>
</author>
<published>2025-07-11T04:09:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=8d84b32075fb2d9bd95c7e47b165942411d74bba'/>
<id>8d84b32075fb2d9bd95c7e47b165942411d74bba</id>
<content type='text'>
Introduce a new trait `RawDeviceIdIndex`, which extends `RawDeviceId`
to provide support for device ID types that include an index or
context field (e.g., `driver_data`). This separates the concerns of
layout compatibility and index-based data embedding, and allows
`RawDeviceId` to be implemented for types that do not contain a
`driver_data` field. Several such structures are defined in
include/linux/mod_devicetable.h.

Refactor `IdArray::new()` into a generic `build()` function, which
takes an optional offset. Based on the presence of `RawDeviceIdIndex`,
index writing is conditionally enabled. A new `new_without_index()`
constructor is also provided for use cases where no index should be
written.

This refactoring is a preparation for enabling the PHY abstractions to
use the RawDeviceId trait.

The changes to acpi.rs and driver.rs were made by Danilo.

Reviewed-by: Trevor Gross &lt;tmgross@umich.edu&gt;
Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@gmail.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250711040947.1252162-2-fujita.tomonori@gmail.com
Signed-off-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Introduce a new trait `RawDeviceIdIndex`, which extends `RawDeviceId`
to provide support for device ID types that include an index or
context field (e.g., `driver_data`). This separates the concerns of
layout compatibility and index-based data embedding, and allows
`RawDeviceId` to be implemented for types that do not contain a
`driver_data` field. Several such structures are defined in
include/linux/mod_devicetable.h.

Refactor `IdArray::new()` into a generic `build()` function, which
takes an optional offset. Based on the presence of `RawDeviceIdIndex`,
index writing is conditionally enabled. A new `new_without_index()`
constructor is also provided for use cases where no index should be
written.

This refactoring is a preparation for enabling the PHY abstractions to
use the RawDeviceId trait.

The changes to acpi.rs and driver.rs were made by Danilo.

Reviewed-by: Trevor Gross &lt;tmgross@umich.edu&gt;
Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@gmail.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Link: https://lore.kernel.org/r/20250711040947.1252162-2-fujita.tomonori@gmail.com
Signed-off-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust: acpi: remove unneeded cast to clean future Clippy warning</title>
<updated>2025-07-03T17:18:59+00:00</updated>
<author>
<name>Miguel Ojeda</name>
<email>ojeda@kernel.org</email>
</author>
<published>2025-07-01T17:46:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=97ba207a994f7d0cc58f19d448e98db6735f5e77'/>
<id>97ba207a994f7d0cc58f19d448e98db6735f5e77</id>
<content type='text'>
A future Clippy warning, `clippy::as_underscore`, is getting enabled in
parallel in the rust-next tree:

    error: using `as _` conversion
      --&gt; rust/kernel/acpi.rs:25:9
       |
    25 |         self.0.driver_data as _
       |         ^^^^^^^^^^^^^^^^^^^^^^-
       |                               |
       |                               help: consider giving the type explicitly: `usize`

The type is already `ulong`, which nowadays is always `usize`, so the
cast is unneeded. Thus remove it, which in turn will avoid the warning
in the future.

Other abstractions of device tables do not use a cast here either.

Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Reviewed-by: Trevor Gross &lt;tmgross@umich.edu&gt;
Link: https://lore.kernel.org/r/20250701174656.62205-1-ojeda@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A future Clippy warning, `clippy::as_underscore`, is getting enabled in
parallel in the rust-next tree:

    error: using `as _` conversion
      --&gt; rust/kernel/acpi.rs:25:9
       |
    25 |         self.0.driver_data as _
       |         ^^^^^^^^^^^^^^^^^^^^^^-
       |                               |
       |                               help: consider giving the type explicitly: `usize`

The type is already `ulong`, which nowadays is always `usize`, so the
cast is unneeded. Thus remove it, which in turn will avoid the warning
in the future.

Other abstractions of device tables do not use a cast here either.

Signed-off-by: Miguel Ojeda &lt;ojeda@kernel.org&gt;
Reviewed-by: Trevor Gross &lt;tmgross@umich.edu&gt;
Link: https://lore.kernel.org/r/20250701174656.62205-1-ojeda@kernel.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>rust: acpi: add `acpi::DeviceId` abstraction</title>
<updated>2025-06-26T21:22:17+00:00</updated>
<author>
<name>Igor Korotin</name>
<email>igor.korotin.linux@gmail.com</email>
</author>
<published>2025-06-20T15:24:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.exis.tech/linux.git/commit/?id=a74931eb59cf6b914e1b9471d9abd4429176f6af'/>
<id>a74931eb59cf6b914e1b9471d9abd4429176f6af</id>
<content type='text'>
`acpi::DeviceId` is an abstraction around `struct acpi_device_id`.

Enable drivers to build ACPI device ID tables, to be consumed by the
corresponding bus abstractions, such as platform or I2C.

Signed-off-by: Igor Korotin &lt;igor.korotin.linux@gmail.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Link: https://lore.kernel.org/r/20250620152425.285683-1-igor.korotin.linux@gmail.com
[ Always inline DeviceId::new() and use &amp;'static CStr; slightly reword
  commit message. - Danilo ]
Signed-off-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
`acpi::DeviceId` is an abstraction around `struct acpi_device_id`.

Enable drivers to build ACPI device ID tables, to be consumed by the
corresponding bus abstractions, such as platform or I2C.

Signed-off-by: Igor Korotin &lt;igor.korotin.linux@gmail.com&gt;
Acked-by: Rafael J. Wysocki &lt;rafael@kernel.org&gt;
Link: https://lore.kernel.org/r/20250620152425.285683-1-igor.korotin.linux@gmail.com
[ Always inline DeviceId::new() and use &amp;'static CStr; slightly reword
  commit message. - Danilo ]
Signed-off-by: Danilo Krummrich &lt;dakr@kernel.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
