Re: [PATCH v3] rust: add bindings and API for bitmap.h and bitops.h.

From: Yury Norov
Date: Mon Mar 10 2025 - 14:19:05 EST


On Mon, Mar 10, 2025 at 05:53:10PM +0100, Miguel Ojeda wrote:
> Hi Burak,
>
> Some quick notes...
>
> On Mon, Mar 10, 2025 at 5:20 PM Burak Emir <bqe@xxxxxxxxxx> wrote:
> >
> > +void rust_helper_bitmap_copy_and_extend(unsigned long *dst, const unsigned long *src, unsigned int count, unsigned int size)
> > +{
> > + bitmap_copy_and_extend(dst, src, count, size);
> > +}
>
> Please use the same parameter names as the real one, i.e. `to` and `from`.
>
> > +/// Wraps underlying C bitmap structure.
>
> I am not sure I would say it "structure" here, i.e. it seems like it
> actually wraps a C `struct bitmap`.

There's no such a thing like 'struct bitmap'. It's internally an array
of unsigned longs. I'd rather say it like:

Wraps underlying C bitmap API.