[PATCH v9 1/2] lib/bitmap: add bitmap_{read,write}()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Thu Oct 26 06:34:24 PDT 2023


On Thu, Oct 26, 2023 at 03:28:25PM +0200, Alexander Potapenko wrote:

...

> > I still didn't get the grouping you implied with this...
> 
> Given your second reply, I can disregard this one, right?

Yes.

...

> > > +     if (unlikely(!nbits || nbits > BITS_PER_LONG))
> > > +             return 0;
> >
> > ...this return in the Return section.
> >
> 
> Parameter description for @nbits actually mentions BITS_PER_LONG
> already, so would it be ok to drop the Note: and extend the Returns:
> section as follows:
> 
> + * Returns: value of nbits located at the @start bit offset within the @map
> + * memory region. For @nbits = 0 and @nbits > BITS_PER_LONG the return value
> + * is undefined.
> 
> ?

Fine to me.

> (Yury didn't want the zero return value to be part of the contract here).


-- 
With Best Regards,
Andy Shevchenko





More information about the linux-arm-kernel mailing list