提交 67a3b2b6 编写于 作者: R Robert P. J. Day 提交者: Linus Torvalds

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

Signed-off-by: NRobert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 2118116e
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
#include <linux/backing-dev.h> #include <linux/backing-dev.h>
#include <linux/blkpg.h> #include <linux/blkpg.h>
#include <linux/writeback.h> #include <linux/writeback.h>
#include <linux/log2.h>
#include <asm/uaccess.h> #include <asm/uaccess.h>
...@@ -450,7 +451,7 @@ static int __init rd_init(void) ...@@ -450,7 +451,7 @@ static int __init rd_init(void)
err = -ENOMEM; err = -ENOMEM;
if (rd_blocksize > PAGE_SIZE || rd_blocksize < 512 || 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", printk("RAMDISK: wrong blocksize %d, reverting to defaults\n",
rd_blocksize); rd_blocksize);
rd_blocksize = BLOCK_SIZE; rd_blocksize = BLOCK_SIZE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册