summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2018-08-23 19:58:12 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2018-08-24 10:23:30 +0200
commitd8dcbd294572c8a9d55e281ce62e3342c18022ea (patch)
tree8024453abb9936e66cdd3c61a506e2e2b439f5ad /include
parent62a53e0401fcf303c0480b7452054c022d1c8a9e (diff)
downloadbarebox-d8dcbd294572c8a9d55e281ce62e3342c18022ea.tar.gz
barebox-d8dcbd294572c8a9d55e281ce62e3342c18022ea.tar.xz
log2: Use fls_long() in __roundup_pow_of_two()
Convert __roundup_pow_of_two() to use fls_long() instead of fls() so the code would be identical to that found in Linux. This fix also allowed next patch(taken from Linux kernel verbatim) to apply cleanly. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/log2.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/log2.h b/include/linux/log2.h
index 919a227901..c373295f35 100644
--- a/include/linux/log2.h
+++ b/include/linux/log2.h
@@ -54,7 +54,7 @@ bool is_power_of_2(unsigned long n)
static inline __attribute__((const))
unsigned long __roundup_pow_of_two(unsigned long n)
{
- return 1UL << fls(n - 1);
+ return 1UL << fls_long(n - 1);
}
/*