From 949e82744b31b555dd6dba40758e05338f305233 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Fri, 24 Apr 2009 03:58:24 +0000 Subject: sparc: Simplify code using is_power_of_2() routine. Signed-off-by: Robert P. J. Day Signed-off-by: David S. Miller --- arch/sparc/mm/srmmu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'arch/sparc') diff --git a/arch/sparc/mm/srmmu.c b/arch/sparc/mm/srmmu.c index 06c9a7d9820..ade4eb373bd 100644 --- a/arch/sparc/mm/srmmu.c +++ b/arch/sparc/mm/srmmu.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -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(); } -- cgit v1.2.3-70-g09d2