mirror-linux/arch
Yury Norov be56db15fc lib: count_zeros: unify count_{leading,trailing}_zeros()
The 'leading' helper returns BITS_PER_LONG if x == 0, while 'trailing'
one returns COUNT_TRAILING_ZEROS_0, which turns to be -1.

None of the current users explicitly check the returned value for
COUNT_TRAILING_ZEROS_0, except the loongarch, which tests implicitly
for the '>= 0'.

So, align count_trailing_zeros() with the count_leading_zeros(), and
simplify the loongarch handling.

Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Yury Norov <ynorov@nvidia.com>
2026-03-23 13:33:51 -04:00
..
alpha kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
arc kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
arm soc: fixes for 7.0 2026-03-18 08:28:54 -07:00
arm64 arm64 fixes for -rc5 2026-03-20 09:23:01 -07:00
csky kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
hexagon kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
loongarch lib: count_zeros: unify count_{leading,trailing}_zeros() 2026-03-23 13:33:51 -04:00
m68k kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
microblaze mm.git review status for linus..mm-stable 2026-02-12 11:32:37 -08:00
mips ARM: 2026-03-15 12:22:10 -07:00
nios2 kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
openrisc kbuild: Split .modinfo out from ELF_DETAILS 2026-02-26 11:50:19 -07:00
parisc parisc: Flush correct cache in cacheflush() syscall 2026-03-15 09:28:49 +01:00
powerpc ARM: 2026-03-15 12:22:10 -07:00
riscv soc: fixes for 7.0 2026-03-18 08:28:54 -07:00
s390 ARM: 2026-03-15 12:22:10 -07:00
sh sh: platform_early: remove pdev->driver_override check 2026-03-17 20:30:57 +01:00
sparc Second round of Kbuild fixes for 7.0 2026-03-06 20:27:13 -08:00
um Second round of Kbuild fixes for 7.0 2026-03-06 20:27:13 -08:00
x86 x86/topology: use bitmap_weight_from() 2026-03-23 13:33:51 -04:00
xtensa Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
.gitignore
Kconfig sched: Move clock related paravirt code to kernel/sched 2026-01-12 15:39:14 +01:00