projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c9f5b7e
)
sparc: Simplify code using is_power_of_2() routine.
author
Robert P. J. Day
<rpjday@crashcourse.ca>
Fri, 24 Apr 2009 03:58:24 +0000
(
03:58
+0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 16 Jun 2009 11:56:51 +0000
(
04:56
-0700)
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/mm/srmmu.c
patch
|
blob
|
blame
|
history
diff --git
a/arch/sparc/mm/srmmu.c
b/arch/sparc/mm/srmmu.c
index 06c9a7d98206f0256c23a281381bf2d6ab7ca441..ade4eb373bddc2e9d6c85472d26a90e62d457e2b 100644
(file)
--- 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();
}