`__builtin_clz` is for unsigned int, while it is now applied to
unsigned long. This fixes it by using `__builtin_clzl`.
`roundup_pow_of_two()` in `erofs_init_devices()` could give wrong
results although the current compiler optimization level "-O2"
covers it up.
Signed-off-by: Hongzhen Luo <hongzhen@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240709073819.3061805-1-hongzhen@linux.alibaba.com
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
static inline unsigned int fls_long(unsigned long x)
{
- return x ? sizeof(x) * 8 - __builtin_clz(x) : 0;
+ return x ? sizeof(x) * 8 - __builtin_clzl(x) : 0;
}
static inline unsigned long lowbit(unsigned long n)