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:
Brian Behlendorf
2014-09-30 18:07:07 -04:00
parent 9c91800d19
commit 87f8055a91
5 changed files with 3 additions and 97 deletions
+1 -1
View File
@@ -977,7 +977,7 @@ spl_sko_from_obj(spl_kmem_cache_t *skc, void *obj)
static inline uint32_t
spl_offslab_size(spl_kmem_cache_t *skc)
{
return 1UL << (highbit(spl_obj_size(skc)) + 1);
return 1UL << (fls64(spl_obj_size(skc)) + 1);
}
/*