net/mlx5: E-Switch, Set the actions for offloaded rules properly
[linux/fpc-iii.git] / include / asm-generic / bitops / find.h
blob998d4d544f182ee305ae779ec0bf5e4f8f2ef43e
1 #ifndef _ASM_GENERIC_BITOPS_FIND_H_
2 #define _ASM_GENERIC_BITOPS_FIND_H_
4 #ifndef find_next_bit
5 /**
6 * find_next_bit - find the next set bit in a memory region
7 * @addr: The address to base the search on
8 * @offset: The bitnumber to start searching at
9 * @size: The bitmap size in bits
11 * Returns the bit number for the next set bit
12 * If no bits are set, returns @size.
14 extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
15 size, unsigned long offset);
16 #endif
18 #ifndef find_next_zero_bit
19 /**
20 * find_next_zero_bit - find the next cleared bit in a memory region
21 * @addr: The address to base the search on
22 * @offset: The bitnumber to start searching at
23 * @size: The bitmap size in bits
25 * Returns the bit number of the next zero bit
26 * If no bits are zero, returns @size.
28 extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
29 long size, unsigned long offset);
30 #endif
32 #ifdef CONFIG_GENERIC_FIND_FIRST_BIT
34 /**
35 * find_first_bit - find the first set bit in a memory region
36 * @addr: The address to start the search at
37 * @size: The maximum number of bits to search
39 * Returns the bit number of the first set bit.
40 * If no bits are set, returns @size.
42 extern unsigned long find_first_bit(const unsigned long *addr,
43 unsigned long size);
45 /**
46 * find_first_zero_bit - find the first cleared bit in a memory region
47 * @addr: The address to start the search at
48 * @size: The maximum number of bits to search
50 * Returns the bit number of the first cleared bit.
51 * If no bits are zero, returns @size.
53 extern unsigned long find_first_zero_bit(const unsigned long *addr,
54 unsigned long size);
55 #else /* CONFIG_GENERIC_FIND_FIRST_BIT */
57 #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
58 #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
60 #endif /* CONFIG_GENERIC_FIND_FIRST_BIT */
62 #endif /*_ASM_GENERIC_BITOPS_FIND_H_ */