mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
Map highbit64() to fls64()
The fls64() function has been available since Linux 2.6.16 and it should be used to implemented highbit64(). This allows us to provide an optimized implementation and simplify the code. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
@@ -27,17 +27,5 @@
|
||||
|
||||
#include <linux/bitops.h>
|
||||
|
||||
#ifndef HAVE_FLS64
|
||||
|
||||
static inline int fls64(__u64 x)
|
||||
{
|
||||
__u32 h = x >> 32;
|
||||
if (h)
|
||||
return fls(h) + 32;
|
||||
return fls(x);
|
||||
}
|
||||
|
||||
#endif /* HAVE_FLS64 */
|
||||
|
||||
#endif /* _SPL_BITOPS_COMPAT_H */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user