projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
115bcd1
)
drivers/char/mem.c: clean up the code
author
Changli Gao
<
[email protected]
>
Wed, 23 Mar 2011 23:42:58 +0000
(16:42 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 24 Mar 2011 02:46:40 +0000
(19:46 -0700)
Reduce the lines of code and simplify the logic.
Signed-off-by: Changli Gao <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
drivers/char/mem.c
patch
|
blob
|
history
diff --git
a/drivers/char/mem.c
b/drivers/char/mem.c
index 1256454b2d4364f7fa6ad95b661d30ad62b673b4..436a990179988a06fb10e18884cb9db56371fdb5 100644
(file)
--- a/
drivers/char/mem.c
+++ b/
drivers/char/mem.c
@@
-47,10
+47,7
@@
static inline unsigned long size_inside_page(unsigned long start,
#ifndef ARCH_HAS_VALID_PHYS_ADDR_RANGE
static inline int valid_phys_addr_range(unsigned long addr, size_t count)
{
- if (addr + count > __pa(high_memory))
- return 0;
-
- return 1;
+ return addr + count <= __pa(high_memory);
}
static inline int valid_mmap_phys_addr_range(unsigned long pfn, size_t size)