]> xenbits.xensource.com Git - people/royger/xen.git/commitdiff
xen/bitops: Delete find_first_set_bit()
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 14 Mar 2024 20:38:44 +0000 (20:38 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Sat, 1 Jun 2024 01:28:14 +0000 (02:28 +0100)
No more users.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
xen/arch/arm/include/asm/bitops.h
xen/arch/ppc/include/asm/bitops.h
xen/arch/x86/include/asm/bitops.h

index ab030b6cb032308f42821caae4765f8105c7ad54..6c5ec34e66716735aac912fc84a5f850e1435e2a 100644 (file)
@@ -160,18 +160,6 @@ static inline int fls(unsigned int x)
 #define ffs(x) ({ unsigned int __t = (x); fls(ISOLATE_LSB(__t)); })
 #define ffsl(x) ({ unsigned long __t = (x); flsl(ISOLATE_LSB(__t)); })
 
-/**
- * find_first_set_bit - find the first set bit in @word
- * @word: the word to search
- *
- * Returns the bit-number of the first set bit (first bit being 0).
- * The input must *not* be zero.
- */
-static inline unsigned int find_first_set_bit(unsigned long word)
-{
-        return ffsl(word) - 1;
-}
-
 /**
  * hweightN - returns the hamming weight of a N-bit word
  * @x: the word to weigh
index bea655796d64d9d4dfd88c0ef0e5370931163947..f984789e2898cf4ae9215315482d2793ea6cd0c9 100644 (file)
@@ -187,13 +187,4 @@ static inline int __test_and_clear_bit(int nr, volatile void *addr)
 #define hweight16(x) __builtin_popcount((uint16_t)(x))
 #define hweight8(x)  __builtin_popcount((uint8_t)(x))
 
-/**
- * find_first_set_bit - find the first set bit in @word
- * @word: the word to search
- *
- * Returns the bit-number of the first set bit (first bit being 0).
- * The input must *not* be zero.
- */
-#define find_first_set_bit(x) (ffsl(x) - 1)
-
 #endif /* _ASM_PPC_BITOPS_H */
index 5a71afbc89d5d3f5dbb67a76de89e01b234d5308..674c48397f385a47bf89ddd763c0428909aff738 100644 (file)
@@ -401,18 +401,6 @@ static always_inline unsigned int __scanbit(unsigned long val, unsigned int max)
     r__;                                                                    \
 })
 
-/**
- * find_first_set_bit - find the first set bit in @word
- * @word: the word to search
- * 
- * Returns the bit-number of the first set bit. The input must *not* be zero.
- */
-static inline unsigned int find_first_set_bit(unsigned long word)
-{
-    asm ( "rep; bsf %1,%0" : "=r" (word) : "rm" (word) );
-    return (unsigned int)word;
-}
-
 /**
  * ffs - find first bit set
  * @x: the word to search