diff options
| author | Shaopeng Tan <tan.shaopeng@jp.fujitsu.com> | 2025-06-23 16:46:45 +0900 |
|---|---|---|
| committer | Yury Norov <yury.norov@gmail.com> | 2025-07-31 11:28:03 -0400 |
| commit | b0c85e99458af829c32c225b43f638443bff14e5 (patch) | |
| tree | 932cf3ef627000bec1b27288db081f5762e7790b /include/linux/find.h | |
| parent | f49a4af3fabce56aaef125f0d959b81afe194afb (diff) | |
cpumask: Remove unnecessary cpumask_nth_andnot()
Commit 94f753143028("x86/resctrl: Optimize cpumask_any_housekeeping()")
switched the only user of cpumask_nth_andnot() to other cpumask
functions, but left the function cpumask_nth_andnot() unused.
This makes function find_nth_andnot_bit() unused as well. Delete them.
Signed-off-by: Shaopeng Tan <tan.shaopeng@jp.fujitsu.com>
Signed-off-by: Yury Norov [NVIDIA] <yury.norov@gmail.com>
Diffstat (limited to 'include/linux/find.h')
| -rw-r--r-- | include/linux/find.h | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/include/linux/find.h b/include/linux/find.h index 98c61838002c..9d720ad92bc1 100644 --- a/include/linux/find.h +++ b/include/linux/find.h @@ -270,33 +270,6 @@ unsigned long find_nth_and_bit(const unsigned long *addr1, const unsigned long * } /** - * find_nth_andnot_bit - find N'th set bit in 2 memory regions, - * flipping bits in 2nd region - * @addr1: The 1st address to start the search at - * @addr2: The 2nd address to start the search at - * @size: The maximum number of bits to search - * @n: The number of set bit, which position is needed, counting from 0 - * - * Returns the bit number of the N'th set bit. - * If no such, returns @size. - */ -static __always_inline -unsigned long find_nth_andnot_bit(const unsigned long *addr1, const unsigned long *addr2, - unsigned long size, unsigned long n) -{ - if (n >= size) - return size; - - if (small_const_nbits(size)) { - unsigned long val = *addr1 & (~*addr2) & GENMASK(size - 1, 0); - - return val ? fns(val, n) : size; - } - - return __find_nth_andnot_bit(addr1, addr2, size, n); -} - -/** * find_nth_and_andnot_bit - find N'th set bit in 2 memory regions, * excluding those set in 3rd region * @addr1: The 1st address to start the search at |
