Skip to content

Commit

Permalink
kmap: remove kmap_atomic_to_page()
Browse files Browse the repository at this point in the history
kmap_atomic_to_page() has no callers and is only defined on 1 arch and
declared on another.  Remove it.

Suggested-by: Al Viro <[email protected]>
Signed-off-by: Ira Weiny <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Christian König <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Chris Zankel <[email protected]>
Cc: Daniel Vetter <[email protected]>
Cc: Dan Williams <[email protected]>
Cc: Dave Hansen <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: Helge Deller <[email protected]>
Cc: "H. Peter Anvin" <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: "James E.J. Bottomley" <[email protected]>
Cc: Max Filippov <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Bogendoerfer <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
weiny2 authored and torvalds committed Jun 5, 2020
1 parent 915ecc2 commit 8bfb1a1
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 15 deletions.
1 change: 0 additions & 1 deletion arch/csky/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ extern pte_t *pkmap_page_table;
#define ARCH_HAS_KMAP_FLUSH_TLB
extern void kmap_flush_tlb(unsigned long addr);
extern void *kmap_atomic_pfn(unsigned long pfn);
extern struct page *kmap_atomic_to_page(void *ptr);

#define flush_cache_kmaps() do {} while (0)

Expand Down
13 changes: 0 additions & 13 deletions arch/csky/mm/highmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,19 +81,6 @@ void *kmap_atomic_pfn(unsigned long pfn)
return (void *) vaddr;
}

struct page *kmap_atomic_to_page(void *ptr)
{
unsigned long idx, vaddr = (unsigned long)ptr;
pte_t *pte;

if (vaddr < FIXADDR_START)
return virt_to_page(ptr);

idx = virt_to_fix(vaddr);
pte = kmap_pte - (idx - FIX_KMAP_BEGIN);
return pte_page(*pte);
}

static void __init kmap_pages_init(void)
{
unsigned long vaddr;
Expand Down
1 change: 0 additions & 1 deletion arch/nds32/include/asm/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ extern void kmap_init(void);
*/
#ifdef CONFIG_HIGHMEM
extern void *kmap_atomic_pfn(unsigned long pfn);
extern struct page *kmap_atomic_to_page(void *ptr);
#endif

#endif

0 comments on commit 8bfb1a1

Please sign in to comment.