diff options
author | Robert P. J. Day <rpjday@crashcourse.ca> | 2009-04-23 23:58:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-16 07:56:51 -0400 |
commit | 949e82744b31b555dd6dba40758e05338f305233 (patch) | |
tree | 652eddd3c119d9d6a4372ab328ed02aeb4fdf91f /arch/sparc/mm/srmmu.c | |
parent | c9f5b7e77c30da25104a3f7f26ac46c07d7b5cb6 (diff) |
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/srmmu.c')
-rw-r--r-- | arch/sparc/mm/srmmu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 06c9a7d98206..ade4eb373bdd 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/fs.h> | 19 | #include <linux/fs.h> |
20 | #include <linux/seq_file.h> | 20 | #include <linux/seq_file.h> |
21 | #include <linux/kdebug.h> | 21 | #include <linux/kdebug.h> |
22 | #include <linux/log2.h> | ||
22 | 23 | ||
23 | #include <asm/bitext.h> | 24 | #include <asm/bitext.h> |
24 | #include <asm/page.h> | 25 | #include <asm/page.h> |
@@ -349,7 +350,7 @@ static void srmmu_free_nocache(unsigned long vaddr, int size) | |||
349 | vaddr, srmmu_nocache_end); | 350 | vaddr, srmmu_nocache_end); |
350 | BUG(); | 351 | BUG(); |
351 | } | 352 | } |
352 | if (size & (size-1)) { | 353 | if (!is_power_of_2(size)) { |
353 | printk("Size 0x%x is not a power of 2\n", size); | 354 | printk("Size 0x%x is not a power of 2\n", size); |
354 | BUG(); | 355 | BUG(); |
355 | } | 356 | } |