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:
6555bc0
)
mm, highmem: use PKMAP_NR() to calculate an index of pkmap
author
Joonsoo Kim
<
[email protected]
>
Wed, 12 Dec 2012 00:01:17 +0000
(16:01 -0800)
committer
Linus Torvalds
<
[email protected]
>
Wed, 12 Dec 2012 01:22:24 +0000
(17:22 -0800)
To calculate an index of pkmap, using PKMAP_NR() is more understandable
and maintainable, so change it.
Signed-off-by: Joonsoo Kim <
[email protected]
>
Cc: Mel Gorman <
[email protected]
>
Reviewed-by: Minchan Kim <
[email protected]
>
Cc: Peter Zijlstra <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/highmem.c
patch
|
blob
|
history
diff --git
a/mm/highmem.c
b/mm/highmem.c
index 2da13a5c50e2b48e8fe8dea34d4bd4835c127da9..2576a71189815abfd7bcf86c88ff3647e4a17c23 100644
(file)
--- a/
mm/highmem.c
+++ b/
mm/highmem.c
@@
-99,7
+99,7
@@
struct page *kmap_to_page(void *vaddr)
unsigned long addr = (unsigned long)vaddr;
if (addr >= PKMAP_ADDR(0) && addr < PKMAP_ADDR(LAST_PKMAP)) {
- int i =
(addr - PKMAP_ADDR(0)) >> PAGE_SHIFT
;
+ int i =
PKMAP_NR(addr)
;
return pte_page(pkmap_page_table[i]);
}