diff options
author | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-10-06 19:42:24 +0300 |
---|---|---|
committer | Konstantin Komarov <almaz.alexandrovich@paragon-software.com> | 2022-11-14 19:50:42 +0300 |
commit | 08811ba59a61e8147c869e2d056c37ab8ca5ebde (patch) | |
tree | 19b4e2ed556f73feff8023a6eb1742c2315e15cf /fs/ntfs3/bitfunc.c | |
parent | 095d8ce635c116bb7813d865adfbccde8094d920 (diff) |
fs/ntfs3: Add ntfs_bitmap_weight_le function and refactoring
Added ntfs_bitmap_weight_le function.
Changed argument types of bits/bitmap functions.
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Diffstat (limited to 'fs/ntfs3/bitfunc.c')
-rw-r--r-- | fs/ntfs3/bitfunc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ntfs3/bitfunc.c b/fs/ntfs3/bitfunc.c index 50d838093790..25a4d4896aa9 100644 --- a/fs/ntfs3/bitfunc.c +++ b/fs/ntfs3/bitfunc.c @@ -30,7 +30,7 @@ static const u8 zero_mask[] = { 0xFF, 0xFE, 0xFC, 0xF8, 0xF0, * * Return: True if all bits [bit, bit+nbits) are zeros "0". */ -bool are_bits_clear(const ulong *lmap, size_t bit, size_t nbits) +bool are_bits_clear(const void *lmap, size_t bit, size_t nbits) { size_t pos = bit & 7; const u8 *map = (u8 *)lmap + (bit >> 3); @@ -78,7 +78,7 @@ bool are_bits_clear(const ulong *lmap, size_t bit, size_t nbits) * * Return: True if all bits [bit, bit+nbits) are ones "1". */ -bool are_bits_set(const ulong *lmap, size_t bit, size_t nbits) +bool are_bits_set(const void *lmap, size_t bit, size_t nbits) { u8 mask; size_t pos = bit & 7; |