arm64: insn: use set_fixmap_offset to make it more clear
authoryalin wang <yalin.wang2010@gmail.com>
Fri, 24 Jul 2015 11:52:28 +0000 (12:52 +0100)
committerWill Deacon <will.deacon@arm.com>
Mon, 27 Jul 2015 10:08:41 +0000 (11:08 +0100)
A little change to patch_map() function,
use set_fixmap_offset() to make code more clear.

Signed-off-by: yalin wang <yalin.wang2010@gmail.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/insn.c

index dd9671cd0bb255b2b5fa32a5e1e5a61b6decaac5..f341866aa810340e47aa9b7283b6b472ca2eae84 100644 (file)
@@ -101,9 +101,8 @@ static void __kprobes *patch_map(void *addr, int fixmap)
                return addr;
 
        BUG_ON(!page);
-       set_fixmap(fixmap, page_to_phys(page));
-
-       return (void *) (__fix_to_virt(fixmap) + (uintaddr & ~PAGE_MASK));
+       return (void *)set_fixmap_offset(fixmap, page_to_phys(page) +
+                       (uintaddr & ~PAGE_MASK));
 }
 
 static void __kprobes patch_unmap(int fixmap)