Skip to content

Commit

Permalink
sparc: Simplify code using is_power_of_2() routine.
Browse files Browse the repository at this point in the history
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Robert P. J. Day authored and David S. Miller committed Jun 16, 2009
1 parent c9f5b7e commit 949e827
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/sparc/mm/srmmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 949e827

Please sign in to comment.