Merge tag 'iommu-updates-v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/joro...
[firefly-linux-kernel-4.4.55.git] / drivers / md / dm-cache-policy-smq.c
index 1ffbeb1b3ea6088fd07bed9c68352821223c0b84..28d4586748d0033e1a2940bd8688b72ba34e84e5 100644 (file)
@@ -566,7 +566,7 @@ static int h_init(struct hash_table *ht, struct entry_space *es, unsigned nr_ent
 
        ht->es = es;
        nr_buckets = roundup_pow_of_two(max(nr_entries / 4u, 16u));
-       ht->hash_bits = ffs(nr_buckets) - 1;
+       ht->hash_bits = __ffs(nr_buckets);
 
        ht->buckets = vmalloc(sizeof(*ht->buckets) * nr_buckets);
        if (!ht->buckets)