lkml.org 
[lkml]   [2017]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH RFC] lib: simplify bitmap_from_u32array API
Date
I certainly approve.  The name sucks too 😉

> @@ -60,7 +60,7 @@
> * bitmap_find_free_region(bitmap, bits, order) Find and allocate bit region
> * bitmap_release_region(bitmap, pos, order) Free specified bit region
> * bitmap_allocate_region(bitmap, pos, order) Allocate specified bit region
> - * bitmap_from_u32array(dst, nbits, buf, nwords) *dst = *buf (nwords 32b
> words)
> + * bitmap_from_u32array(dst, buf, nbits) *dst = *buf (nwords 32b
> words)

I think this should read:
+ * bitmap_from_u32array(dst, buf, bits) Copy 'bits' from buf to dst

Also, on LE systems, shouldn't we just use memcpy() for the first bits/8 bytes?


\
 
 \ /
  Last update: 2017-11-15 20:25    [W:0.050 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site