From 949e82744b31b555dd6dba40758e05338f305233 Mon Sep 17 00:00:00 2001 From: "Robert P. J. Day" Date: Fri, 24 Apr 2009 03:58:24 +0000 Subject: [PATCH] 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(-) 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 #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(); } -- 2.7.4