s390/bitops: Slightly optimize ffs() and fls64()

Use a simpler algorithm to calculate the result of ffs() and fls64().
This generates slightly better code and increases readability.

Kernel image size is reduced by ~3kb (gcc 15.1.0 + defconfig).

Suggested-by: Nina Schoetterl-Glausch <nsg@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Heiko Carstens 2025-08-04 17:08:54 +02:00 • committed by Alexander Gordeev
commit de88e74889