Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d744540c authored by Jonathan Brassow's avatar Jonathan Brassow Committed by NeilBrown
Browse files

MD: use is_power_of_2 macro



Make use of is_power_of_2 macro.

Signed-off-by: default avatarJonathan Brassow <jbrassow@redhat.com>
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent d6b212f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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";