rust-for-linux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Abdiel Janulgue <abdiel.janulgue@gmail.com>
To: Daniel Almeida <daniel.almeida@collabora.com>
Cc: rust-for-linux@vger.kernel.org, aliceryhl@google.com,
	a.hindborg@kernel.org, dakr@redhat.com, airlied@redhat.com,
	miguel.ojeda.sandonis@gmail.com, wedsonaf@gmail.com,
	a.hindborg@samsung.com
Subject: Re: [PATCH v4 2/2] rust: add dma coherent allocator abstraction.
Date: Mon, 11 Nov 2024 12:48:55 +0200	[thread overview]
Message-ID: <bf8a1bb0-59ab-41cb-9116-2258d9ce686e@gmail.com> (raw)
In-Reply-To: <A970979F-F4E6-4474-81F2-8FF471C82C35@collabora.com>


On 10/11/2024 01:42, Daniel Almeida wrote:
>> You mean the read/write helpers could be removed and we expose the cpu_buf() helper instead that takes a valid range, returns a checked slice and let the user have the flexibility in implementing read/writes themselves. Is this what you had in mind?
> 
> Yes, that’s what I have in mind.
> 
> 
> Alice pointed out to me later that the FromBytes/AsBytes traits can be implemented
> by driver-defined types. I had missed that.
> 
> Given this, the FromBytes/AsBytes bound seems fine. Drivers would just need to
> implement the (unsafe) traits for their types and it would be up to them to make
> sure that the safety requirements hold.
> 
> Given the above, I am fine with FromBytes/AsBytes, you don’t need to change
> that IMHO.
> 
> With read() and write() gone, so is the bound on Copy, which also satisfies
> my other comment.
> 

Thanks! Will incorporate this feedback on the next re-spin.

/abdiel

  reply	other threads:[~2024-11-11 10:49 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-05 10:46 [PATCH v4 0/2] Add dma coherent allocator abstraction Abdiel Janulgue
2024-11-05 10:46 ` [PATCH v4 1/2] rust: error: Add EOVERFLOW Abdiel Janulgue
2024-11-05 10:46 ` [PATCH v4 2/2] rust: add dma coherent allocator abstraction Abdiel Janulgue
2024-11-05 11:23   ` Miguel Ojeda
2024-11-06  8:47     ` Abdiel Janulgue
2024-11-06 10:21     ` Dirk Behme
2024-11-06 11:25       ` Miguel Ojeda
2024-11-06 16:40   ` Daniel Almeida
2024-11-07 13:01     ` Abdiel Janulgue
2024-11-09 23:42       ` Daniel Almeida
2024-11-11 10:48         ` Abdiel Janulgue [this message]
2024-11-11 12:55   ` Andreas Hindborg
2024-11-11 12:59     ` Abdiel Janulgue
2024-11-05 11:23 ` [PATCH v4 0/2] Add " Miguel Ojeda
2024-11-06  8:47   ` Abdiel Janulgue

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf8a1bb0-59ab-41cb-9116-2258d9ce686e@gmail.com \
    --to=abdiel.janulgue@gmail.com \
    --cc=a.hindborg@kernel.org \
    --cc=a.hindborg@samsung.com \
    --cc=airlied@redhat.com \
    --cc=aliceryhl@google.com \
    --cc=dakr@redhat.com \
    --cc=daniel.almeida@collabora.com \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=wedsonaf@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).