Re: [PATCH v2 3/5] rust: page: Extend support to vmalloc_to_page
From: Danilo Krummrich
Date: Wed Oct 23 2024 - 07:30:56 EST
On Wed, Oct 23, 2024 at 01:26:37PM +0300, Abdiel Janulgue wrote:
> On 23/10/2024 11:42, Danilo Krummrich wrote:
> > > + ) -> Result<&'a Self, AllocError>
> >
> > Please don't use `AllocError`. We're not allocating anything here.
> >
> > Anyway, do we need this as a separate function at all?
> Thanks. Would it make sense to squash this function into
> `Page::page_slice_to_page` instead?
Probably, though in the future we might also want to add `virt_to_page()` if
to `Page::page_slice_to_page` if it's not a Vmalloc address.
But I think it should be fine to handle both cases in `Page::page_slice_to_page`
directly.
>
> /Abdiel
>