diff options
author | 2024-08-13 13:52:30 -0700 | |
---|---|---|
committer | 2024-08-13 13:52:30 -0700 | |
commit | 50470d3899cdf06fd58def74dec87f31e13cda6f (patch) | |
tree | 9d4d04c0c394f079127752d6d5b796aa33b903ca /tools/testing/radix-tree/bitmap.c | |
parent | libbpf: Fix license for btf_relocate.c (diff) | |
parent | add struct fd constructors, get rid of __to_fd() (diff) | |
download | wireguard-linux-50470d3899cdf06fd58def74dec87f31e13cda6f.tar.xz wireguard-linux-50470d3899cdf06fd58def74dec87f31e13cda6f.zip |
Merge remote-tracking branch 'vfs/stable-struct_fd'
Merge Al Viro's struct fd refactorings.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | tools/testing/radix-tree/bitmap.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/tools/testing/radix-tree/bitmap.c b/tools/testing/radix-tree/bitmap.c deleted file mode 100644 index 66ec4a24a203..000000000000 --- a/tools/testing/radix-tree/bitmap.c +++ /dev/null @@ -1,23 +0,0 @@ -/* lib/bitmap.c pulls in at least two other files. */ - -#include <linux/bitmap.h> - -void bitmap_clear(unsigned long *map, unsigned int start, int len) -{ - unsigned long *p = map + BIT_WORD(start); - const unsigned int size = start + len; - int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); - unsigned long mask_to_clear = BITMAP_FIRST_WORD_MASK(start); - - while (len - bits_to_clear >= 0) { - *p &= ~mask_to_clear; - len -= bits_to_clear; - bits_to_clear = BITS_PER_LONG; - mask_to_clear = ~0UL; - p++; - } - if (len) { - mask_to_clear &= BITMAP_LAST_WORD_MASK(size); - *p &= ~mask_to_clear; - } -} |