]> git.ipfire.org Git - thirdparty/linux.git/commit
s390/bitops: Slightly optimize ffs() and fls64()
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 4 Aug 2025 15:08:54 +0000 (17:08 +0200)
committerAlexander Gordeev <agordeev@linux.ibm.com>
Wed, 20 Aug 2025 14:38:23 +0000 (16:38 +0200)
commitde88e74889a30bd9ff4047726021cde857348b4b
tree1dd8ecc103aa0870d9b6ff09dddd8f419c20881d
parentf9de6cdf4cf8c932ee94f6e25cd7434a97c78bf3
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>
arch/s390/include/asm/bitops.h