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

Commit 67a3b2b6 authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Linus Torvalds
Browse files

rd: use is_power_of_2() in drivers/block/rd.c.

parent 2118116e
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@
#include <linux/backing-dev.h>
#include <linux/blkpg.h>
#include <linux/writeback.h>
#include <linux/log2.h>

#include <asm/uaccess.h>

@@ -450,7 +451,7 @@ static int __init rd_init(void)
	err = -ENOMEM;

	if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 ||
			(rd_blocksize & (rd_blocksize-1))) {
			!is_power_of_2(rd_blocksize)) {
		printk("RAMDISK: wrong blocksize %d, reverting to defaults\n",
		       rd_blocksize);
		rd_blocksize = BLOCK_SIZE;