[v2 1/5] lib/bitmap: add bitmap_{set,get}_value_unaligned()

William Breathitt Gray william.gray at linaro.org
Fri Jul 14 04:19:15 PDT 2023


On Fri, Jul 14, 2023 at 11:04:16AM +0300, Andy Shevchenko wrote:
> On Thu, Jul 13, 2023 at 08:05:34PM +0200, Alexander Potapenko wrote:
> > On Thu, Jul 13, 2023 at 7:29 PM Andy Shevchenko
> > <andriy.shevchenko at linux.intel.com> wrote:
> > >
> > > +Cc: William
> > >
> > > On Thu, Jul 13, 2023 at 02:57:01PM +0200, Alexander Potapenko wrote:
> > > > The two new functions allow setting/getting values of length up to
> > > > BITS_PER_LONG bits at arbitrary position in the bitmap.
> > >
> > > A couple of years (?) ago it was a series to achieve something like this with
> > > better (?) code. Why not resurrect that one?
> > >
> > > https://www.mail-archive.com/linux-kernel@vger.kernel.org/msg2195426.html
> > 
> > It looks more compact thanks to GENMASK, I can cook something based on
> > the proposed bitmap_{set,get}_value (and change the names if you
> > prefer the shorter ones).
> > But I'd better avoid pulling in the rest of that series without a strong need.
> 
> William, what do you think on this?
> 
> I'm personally prefer William's version as not only it was published first
> it was carefully designed and got a lot of review already. We just hadn't had
> the user for it that time.
> 
> -- 
> With Best Regards,
> Andy Shevchenko

Yes, that version went through several revisions so it's been well
tested and known to work -- as you pointed out it just lacked the users
to warrant merging it into the tree. If it statisfies the use-case
required here now, then I think we should it pick it up rather than
reinvent the solution again.

Also, we probably don't need the "clump" code in there, so perhaps
splitting it out to just the bitmap_{set,get}_value relevant code is
fine.

William Breathitt Gray
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230714/b3d2621f/attachment-0001.sig>


More information about the linux-arm-kernel mailing list