Messages in this thread | | | Date | Mon, 22 Nov 2021 13:28:07 +0200 | From | Andy Shevchenko <> | Subject | Re: [PATCH 1/4] bitops: Add single_bit_set() |
| |
On Mon, Nov 22, 2021 at 01:03:25PM +0200, Matti Vaittinen wrote: > There are cases when it is useful to check a bit-mask has only one bit > set. Add a generic helper for it instead of baking own one for each > user. > > Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> > --- > I am not at all sure what would be the best place for this. Please let > me know if you think some other file would be more appropriate.
So, you decided to reinvent hamming weight... Please, drop this patch and use corresponding hweight() call.
-- With Best Regards, Andy Shevchenko
| |