kmap_atomic_to_page() has no users, remove it
authorNicolas Pitre <nicolas.pitre@linaro.org>
Wed, 21 Oct 2015 22:13:25 +0000 (09:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 5 Nov 2015 05:11:49 +0000 (16:11 +1100)
Removal started in 5bbeed12bdc3 ("sparc32: drop unused
kmap_atomic_to_page").  Let's do it across the whole tree.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
16 files changed:
arch/arm/include/asm/highmem.h
arch/arm/mm/highmem.c
arch/frv/include/asm/highmem.h
arch/frv/mm/highmem.c
arch/metag/include/asm/highmem.h
arch/metag/mm/highmem.c
arch/microblaze/include/asm/highmem.h
arch/mips/include/asm/highmem.h
arch/mips/mm/highmem.c
arch/parisc/include/asm/cacheflush.h
arch/powerpc/include/asm/highmem.h
arch/tile/include/asm/highmem.h
arch/tile/mm/highmem.c
arch/x86/include/asm/highmem.h
arch/x86/mm/highmem_32.c
include/linux/highmem.h

index 5355795..0a0e2d1 100644 (file)
@@ -68,7 +68,6 @@ extern void kunmap(struct page *page);
 extern void *kmap_atomic(struct page *page);
 extern void __kunmap_atomic(void *kvaddr);
 extern void *kmap_atomic_pfn(unsigned long pfn);
-extern struct page *kmap_atomic_to_page(const void *ptr);
 #endif
 
 #endif
index 9df5f09..d02f818 100644 (file)
@@ -147,13 +147,3 @@ void *kmap_atomic_pfn(unsigned long pfn)
 
        return (void *)vaddr;
 }
-
-struct page *kmap_atomic_to_page(const void *ptr)
-{
-       unsigned long vaddr = (unsigned long)ptr;
-
-       if (vaddr < FIXADDR_START)
-               return virt_to_page(ptr);
-
-       return pte_page(get_fixmap_pte(vaddr));
-}
index b3adc93..1f58938 100644 (file)
@@ -62,8 +62,6 @@ extern void kunmap_high(struct page *page);
 extern void *kmap(struct page *page);
 extern void kunmap(struct page *page);
 
-extern struct page *kmap_atomic_to_page(void *ptr);
-
 #endif /* !__ASSEMBLY__ */
 
 /*
index 785344b..45750fb 100644 (file)
@@ -32,11 +32,6 @@ void kunmap(struct page *page)
 
 EXPORT_SYMBOL(kunmap);
 
-struct page *kmap_atomic_to_page(void *ptr)
-{
-       return virt_to_page(ptr);
-}
-
 void *kmap_atomic(struct page *page)
 {
        unsigned long paddr;
index 6646a15..9b1d172 100644 (file)
@@ -56,7 +56,6 @@ extern void kunmap(struct page *page);
 extern void *kmap_atomic(struct page *page);
 extern void __kunmap_atomic(void *kvaddr);
 extern void *kmap_atomic_pfn(unsigned long pfn);
-extern struct page *kmap_atomic_to_page(void *ptr);
 #endif
 
 #endif
index 807f1b1..f19a87f 100644 (file)
@@ -111,20 +111,6 @@ void *kmap_atomic_pfn(unsigned long pfn)
        return (void *)vaddr;
 }
 
-struct page *kmap_atomic_to_page(void *ptr)
-{
-       unsigned long vaddr = (unsigned long)ptr;
-       int idx;
-       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);
-}
-
 void __init kmap_init(void)
 {
        unsigned long kmap_vstart;
index d046389..67925ef 100644 (file)
@@ -76,19 +76,6 @@ static inline void *kmap_atomic(struct page *page)
        return kmap_atomic_prot(page, kmap_prot);
 }
 
-static inline 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);
-}
-
 #define flush_cache_kmaps()    { flush_icache(); flush_dcache(); }
 
 #endif /* __KERNEL__ */
index 572e63e..01880b3 100644 (file)
@@ -49,7 +49,6 @@ extern void kunmap(struct page *page);
 extern void *kmap_atomic(struct page *page);
 extern void __kunmap_atomic(void *kvaddr);
 extern void *kmap_atomic_pfn(unsigned long pfn);
-extern struct page *kmap_atomic_to_page(void *ptr);
 
 #define flush_cache_kmaps()    flush_cache_all()
 
index 11661cb..d7258a1 100644 (file)
@@ -118,19 +118,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);
-}
-
 void __init kmap_init(void)
 {
        unsigned long kmap_vstart;
index ec2df4b..845272c 100644 (file)
@@ -156,7 +156,6 @@ static inline void __kunmap_atomic(void *addr)
 
 #define kmap_atomic_prot(page, prot)   kmap_atomic(page)
 #define kmap_atomic_pfn(pfn)   kmap_atomic(pfn_to_page(pfn))
-#define kmap_atomic_to_page(ptr)       virt_to_page(ptr)
 
 #endif /* _PARISC_CACHEFLUSH_H */
 
index caaf6e0..01c2c23 100644 (file)
@@ -84,19 +84,6 @@ static inline void *kmap_atomic(struct page *page)
        return kmap_atomic_prot(page, kmap_prot);
 }
 
-static inline 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);
-}
-
 
 #define flush_cache_kmaps()    flush_cache_all()
 
index fc8429a..979579b 100644 (file)
@@ -63,7 +63,6 @@ void *kmap_atomic(struct page *page);
 void __kunmap_atomic(void *kvaddr);
 void *kmap_atomic_pfn(unsigned long pfn);
 void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot);
-struct page *kmap_atomic_to_page(void *ptr);
 void *kmap_atomic_prot(struct page *page, pgprot_t prot);
 void kmap_atomic_fix_kpte(struct page *page, int finished);
 
index fcd5450..eca2855 100644 (file)
@@ -275,15 +275,3 @@ void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot)
 {
        return kmap_atomic_prot(pfn_to_page(pfn), prot);
 }
-
-struct page *kmap_atomic_to_page(void *ptr)
-{
-       pte_t *pte;
-       unsigned long vaddr = (unsigned long)ptr;
-
-       if (vaddr < FIXADDR_START)
-               return virt_to_page(ptr);
-
-       pte = kmap_get_pte(vaddr);
-       return pte_page(*pte);
-}
index 04e9d02..1c0b437 100644 (file)
@@ -68,7 +68,6 @@ void *kmap_atomic(struct page *page);
 void __kunmap_atomic(void *kvaddr);
 void *kmap_atomic_pfn(unsigned long pfn);
 void *kmap_atomic_prot_pfn(unsigned long pfn, pgprot_t prot);
-struct page *kmap_atomic_to_page(void *ptr);
 
 #define flush_cache_kmaps()    do { } while (0)
 
index eecb207..a6d7392 100644 (file)
@@ -104,20 +104,6 @@ void __kunmap_atomic(void *kvaddr)
 }
 EXPORT_SYMBOL(__kunmap_atomic);
 
-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);
-}
-EXPORT_SYMBOL(kmap_atomic_to_page);
-
 void __init set_highmem_pages_init(void)
 {
        struct zone *zone;
index 6aefcd0..bb3f329 100644 (file)
@@ -78,7 +78,6 @@ static inline void __kunmap_atomic(void *addr)
 }
 
 #define kmap_atomic_pfn(pfn)   kmap_atomic(pfn_to_page(pfn))
-#define kmap_atomic_to_page(ptr)       virt_to_page(ptr)
 
 #define kmap_flush_unused()    do {} while(0)
 #endif