Re: [PATCH 27/54] lib/bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions
From: Peter Zijlstra
Date: Mon Jan 24 2022 - 07:49:53 EST
- Next message: Anshuman Khandual: "[RFC V1 00/31] mm/mmap: Drop protection_map[] and platform's __SXXX/__PXXX requirements"
- Previous message: Andy Shevchenko: "Re: [PATCH 33/54] net: ethernet: replace bitmap_weight with bitmap_weight_{eq,gt,ge,lt,le} for mellanox"
- In reply to: Andy Shevchenko: "Re: [PATCH 27/54] lib/bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions"
- Next in thread: Yury Norov: "Re: [PATCH 27/54] lib/bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Jan 24, 2022 at 02:43:30PM +0200, Andy Shevchenko wrote:
> It may be other way around:
>
> if ((unsigned int)num > nbits)
Yes, that's my preferred method too :-)
- Next message: Anshuman Khandual: "[RFC V1 00/31] mm/mmap: Drop protection_map[] and platform's __SXXX/__PXXX requirements"
- Previous message: Andy Shevchenko: "Re: [PATCH 33/54] net: ethernet: replace bitmap_weight with bitmap_weight_{eq,gt,ge,lt,le} for mellanox"
- In reply to: Andy Shevchenko: "Re: [PATCH 27/54] lib/bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions"
- Next in thread: Yury Norov: "Re: [PATCH 27/54] lib/bitmap: add bitmap_weight_{cmp, eq, gt, ge, lt, le} functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]