diff options
author | Tom Rini <trini@konsulko.com> | 2023-08-18 13:45:58 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2023-08-18 13:45:58 -0400 |
commit | 3881c9fbb7fdd98f6eae5cd33f7e9abe9455a585 (patch) | |
tree | 3522dea6d6e5bff9c2d9bcae8354e16223c5b518 /include/asm-generic/bitops/builtin-__ffs.h | |
parent | 14ba0a8bbc342a677982acc787ae542b84ed7993 (diff) | |
parent | 48f792e31b88343bfccbaf73808e3d02a2be90dc (diff) |
Merge branch '2023-08-18-assorted-updates' into next
- Use built-in ffs/fls on ARM, fix a PIE issue in SPL on ARMv8, bcm283x
and mediatek updates, whitespace fix in UFS uclass, make CI use
"tools-only" defconfig for more tests, add TI TCA9554 GPIO support,
cache alignment fix for SCSI, and fix a problem with
SYS_MMCSD_RAW_MODE_ARGS_SECTOR in SPL.
Diffstat (limited to 'include/asm-generic/bitops/builtin-__ffs.h')
-rw-r--r-- | include/asm-generic/bitops/builtin-__ffs.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/asm-generic/bitops/builtin-__ffs.h b/include/asm-generic/bitops/builtin-__ffs.h new file mode 100644 index 0000000000..87024da44d --- /dev/null +++ b/include/asm-generic/bitops/builtin-__ffs.h @@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +#ifndef _ASM_GENERIC_BITOPS_BUILTIN___FFS_H_ +#define _ASM_GENERIC_BITOPS_BUILTIN___FFS_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) +{ + return __builtin_ctzl(word); +} + +#endif |