From: Abdiel Janulgue <abdiel.janulgue@gmail.com>
To: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
Abdiel Janulgue <abdiel.janulgue@gmail.com>
Cc: rust-for-linux@vger.kernel.org, aliceryhl@google.com,
daniel.almeida@collabora.com, a.hindborg@kernel.org,
dakr@redhat.com, airlied@redhat.com, wedsonaf@gmail.com,
a.hindborg@samsung.com
Subject: Re: [PATCH v4 2/2] rust: add dma coherent allocator abstraction.
Date: Wed, 6 Nov 2024 10:47:06 +0200 [thread overview]
Message-ID: <af6aa7ed-0eaf-4ce1-82d8-c3915f2c8e49@gmail.com> (raw)
In-Reply-To: <CANiq72nLNQD6f_Y2+jdcn3w_K0oXaEX-Y+mUE6Nco565m8Jzgw@mail.gmail.com>
On 05/11/2024 13:23, Miguel Ojeda wrote:
> Hi Abdiel,
>
> Some quick comments on the docs I noticed.
>
> On Tue, Nov 5, 2024 at 11:47 AM Abdiel Janulgue
> <abdiel.janulgue@gmail.com> wrote:
>>
>> +/// Abstraction of dma_alloc_coherent
>> +///
>> +/// # Invariants
>> +///
>> +/// For the lifetime of an instance of CoherentAllocation, the cpu address is a valid pointer
>> +/// to an allocated region of consistent memory and we hold a reference to the device.
>
> Please use Markdown formatting everywhere (including documentation
> like here, as well as comments). For documentation, also please use
> intra-doc links where applicable (i.e. the square brackets, e.g.
> [`Foo`]).
>
> Also, ideally, please define/explain the abstraction, rather than just
> saying it is an abstraction of something else.
>
> Finally, if you want to have a link to a C header to refer to it, you
> can use a `srctree/...` link (please refer to others to see how it is
> usually done).
>
>> + /// # fn dox(dev: &Device) -> Result<()> {
>
> Can we avoid this, i.e. use the `# Ok::<(), ...>(())` approach instead?
>
> I see we got another `dox()` function in `page.rs`, which I guess is
> where you got it from,
Yep, just learning it from existing code. But will update it.
Regards,
Abdiel
next prev parent reply other threads:[~2024-11-06 8:47 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 [this message]
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
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=af6aa7ed-0eaf-4ce1-82d8-c3915f2c8e49@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).