]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
rust: io: move MIN_SIZE and io_addr_assert to IoKnownSize
authorAlexandre Courbot <acourbot@nvidia.com>
Fri, 30 Jan 2026 13:32:46 +0000 (22:32 +0900)
committerDanilo Krummrich <dakr@kernel.org>
Sun, 1 Feb 2026 21:23:59 +0000 (22:23 +0100)
commit726c262060252e13d5805f9acc382fb9f081ba07
tree306c8cd3023fd87caf5ceb8397b7e9c087633daa
parent72bfbe50ffbf36937c77b39e19143aabdb69b080
rust: io: move MIN_SIZE and io_addr_assert to IoKnownSize

`MIN_SIZE` and `io_addr_assert` are only ever used for IO types which
implement `IoKnownSize` and do not make sense for types that don't.

It looks like they should have been there since the beginning, so move
them while the code is still fresh.

Also update `IoKnownSize`'s documentation since it is not just a marker
trait anymore.

Fixes: 121d87b28e1d ("rust: io: separate generic I/O helpers from MMIO implementation")
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Link: https://patch.msgid.link/20260130-io-min-size-v1-1-65a546e3104d@nvidia.com
[ Fix typo in commit message. - Danilo ]
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
rust/kernel/io.rs
rust/kernel/pci/io.rs