summaryrefslogtreecommitdiffstats
path: root/arch/sparc/mm
diff options
context:
space:
mode:
authorRobert P. J. Day <rpjday@crashcourse.ca>2009-04-24 03:58:24 +0000
committerDavid S. Miller <davem@davemloft.net>2009-06-16 04:56:51 -0700
commit949e82744b31b555dd6dba40758e05338f305233 (patch)
tree652eddd3c119d9d6a4372ab328ed02aeb4fdf91f /arch/sparc/mm
parentc9f5b7e77c30da25104a3f7f26ac46c07d7b5cb6 (diff)
downloadop-kernel-dev-949e82744b31b555dd6dba40758e05338f305233.zip
op-kernel-dev-949e82744b31b555dd6dba40758e05338f305233.tar.gz
sparc: Simplify code using is_power_of_2() routine.
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/mm')
-rw-r--r--arch/sparc/mm/srmmu.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c
index 06c9a7d..ade4eb3 100644
--- a/arch/sparc/mm/srmmu.c
+++ b/arch/sparc/mm/srmmu.c
@@ -19,6 +19,7 @@
#include <linux/fs.h>
#include <linux/seq_file.h>
#include <linux/kdebug.h>
+#include <linux/log2.h>
#include <asm/bitext.h>
#include <asm/page.h>
@@ -349,7 +350,7 @@ static void srmmu_free_nocache(unsigned long vaddr, int size)
vaddr, srmmu_nocache_end);
BUG();
}
- if (size & (size-1)) {
+ if (!is_power_of_2(size)) {
printk("Size 0x%x is not a power of 2\n", size);
BUG();
}
OpenPOWER on IntegriCloud