diff options
author | Stephen Rothwell <sfr@canb.auug.org.au> | 2019-10-31 16:55:10 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2019-10-31 16:55:10 +1100 |
commit | cc9ab103ea566547124232cf03525834f06a9e55 (patch) | |
tree | 2bcadccb69998fec25678309b6826ff349a9d4e2 /include/asm-generic/bitops | |
parent | cbf83a411543bc3296abee873842ee8ff2a3e6b7 (diff) | |
parent | 528ab4a96af0b31981f362addec1913a376dacbc (diff) |
Merge branch 'akpm/master'
Diffstat (limited to 'include/asm-generic/bitops')
-rw-r--r-- | include/asm-generic/bitops/find.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/asm-generic/bitops/find.h b/include/asm-generic/bitops/find.h index 8a1ee10014de..9fdf21302fdf 100644 --- a/include/asm-generic/bitops/find.h +++ b/include/asm-generic/bitops/find.h @@ -80,4 +80,21 @@ extern unsigned long find_first_zero_bit(const unsigned long *addr, #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */ +/** + * find_next_clump8 - find next 8-bit clump with set bits in a memory region + * @clump: location to store copy of found clump + * @addr: address to base the search on + * @size: bitmap size in number of bits + * @offset: bit offset at which to start searching + * + * Returns the bit offset for the next set clump; the found clump value is + * copied to the location pointed by @clump. If no bits are set, returns @size. + */ +extern unsigned long find_next_clump8(unsigned long *clump, + const unsigned long *addr, + unsigned long size, unsigned long offset); + +#define find_first_clump8(clump, bits, size) \ + find_next_clump8((clump), (bits), (size), 0) + #endif /*_ASM_GENERIC_BITOPS_FIND_H_ */ |