summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorJonathan Brassow <jbrassow@redhat.com>2011-06-08 18:01:10 -0500
committerNeilBrown <neilb@suse.de>2011-06-09 11:42:36 +1000
commitd744540cd39e93976c4c8401e140232444ef3b0b (patch)
tree66b818b089b1068ca02f05ed5e7be896fc311d18 /drivers/md
parentd6b212f4b19da5301e6b6eca562e5c7a2a6e8c8d (diff)
downloadtalos-op-linux-d744540cd39e93976c4c8401e140232444ef3b0b.tar.gz
talos-op-linux-d744540cd39e93976c4c8401e140232444ef3b0b.zip
MD: use is_power_of_2 macro
Make use of is_power_of_2 macro. Signed-off-by: Jonathan Brassow <jbrassow@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/bitmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index f0769b34d656..7fc028f9701e 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -651,7 +651,7 @@ static int bitmap_read_sb(struct bitmap *bitmap)
reason = "unrecognized superblock version";
else if (chunksize < 512)
reason = "bitmap chunksize too small";
- else if ((1 << ffz(~chunksize)) != chunksize)
+ else if (!is_power_of_2(chunksize))
reason = "bitmap chunksize not a power of 2";
else if (daemon_sleep < 1 || daemon_sleep > MAX_SCHEDULE_TIMEOUT)
reason = "daemon sleep period out of range";
OpenPOWER on IntegriCloud