mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
mm, highmem: use PKMAP_NR() to calculate an index of pkmap
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]>
This commit is contained in:
parent
6555bc0357
commit
4de22c0584
1 changed files with 1 additions and 1 deletions
|
|
@ -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]);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue