| /* SPDX-License-Identifier: GPL-2.0 */ |
| #ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_ |
| #define _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_ |
| #include <asm/bitsperlong.h> |
| * __ffs - find first bit in word. |
| * @word: The word to search |
| * Undefined if no bit exists, so code should check against 0 first. |
| static __always_inline unsigned long __ffs(unsigned long word) |
| #if __BITS_PER_LONG == 64 |
| if ((word & 0xffffffff) == 0) { |
| if ((word & 0xffff) == 0) { |
| if ((word & 0xff) == 0) { |
| #endif /* _TOOLS_LINUX_ASM_GENERIC_BITOPS___FFS_H_ */ |