Re: [PATCH v6 04/20] rust: io: implement `Io` on reference types instead

"Gary Guo" <[email protected]>
Newsgroups org.kernel.vger.linux-pwm,dev.linux.lists.driver-core,dev.linux.lists.nova-gpu,org.freedesktop.lists.dri-devel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pci,org.kernel.vger.rust-for-linux
Message-ID <[email protected]>
On Wed Jul 8, 2026 at 12:58 PM BST, Daniel Almeida wrote:
>
>> On 6 Jul 2026, at 09:44, Gary Guo <[email protected]> wrote:
>> 
>> Currently, `Io` is implemented on owned I/O objects (e.g. `Bar`). This is
>> going to change with I/O projections, as then `Io` needs to work both for
>> owned objects and views of them. Views are themselves reference-like
>> (however they obviously cannot be references, because they belong to a
>> different address space).
>> 
>> To facilitate the change, change `Io` to be implemented on reference types
>> for the owned I/O objects, and make methods take `self` instead of `&self`.
>> When I/O views are implemented, we can then naturally implement `Io` for
>> these objects.
>> 
>> Reviewed-by: Alexandre Courbot <[email protected]>
>> Signed-off-by: Gary Guo <[email protected]>
>> ---
>> rust/kernel/io.rs     | 82 ++++++++++++++++++++++++++-------------------------
>> rust/kernel/pci/io.rs | 12 ++++----
>> 2 files changed, 48 insertions(+), 46 deletions(-)
>> 
>
> Reviewed-by: Daniel Almeida <[email protected]>

Hi Daniel,

Thanks for reviewing, however, it would be helpful if you can trim messages in
replies.

Thanks,
Gary
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.