asm/io: remove unnecessary xlate_dev_mem_ptr() and unxlate_dev_mem_ptr()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Sat, 18 Nov 2023 10:08:27 +0000 (18:08 +0800)
committerArnd Bergmann <arnd@arndb.de>
Thu, 23 Nov 2023 09:37:40 +0000 (10:37 +0100)
The asm-generic/io.h already has default definition, remove unnecessary
arch's defination.

Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Russell King <linux@armlinux.org.uk>
Cc: Brian Cain <bcain@quicinc.com>
Cc: "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Cc: Nicholas Piggin <npiggin@gmail.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Stanislav Kinsburskii <stanislav.kinsburskii@gmail.com>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/alpha/include/asm/io.h
arch/arm/include/asm/io.h
arch/hexagon/include/asm/io.h
arch/m68k/include/asm/io_mm.h
arch/mips/include/asm/io.h
arch/parisc/include/asm/io.h
arch/powerpc/include/asm/io.h
arch/sh/include/asm/io.h
arch/sparc/include/asm/io_64.h

index 076f0e4..4f47a50 100644 (file)
@@ -650,12 +650,6 @@ extern void outsl (unsigned long port, const void *src, unsigned long count);
 #endif
 #define RTC_ALWAYS_BCD 0
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
 /*
  * These get provided from <asm-generic/iomap.h> since alpha does not
  * select GENERIC_IOMAP.
index 56b08ed..1815748 100644 (file)
@@ -407,12 +407,6 @@ struct pci_dev;
 #define pci_iounmap pci_iounmap
 extern void pci_iounmap(struct pci_dev *dev, void __iomem *addr);
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
 #include <asm-generic/io.h>
 
 #ifdef CONFIG_MMU
index b7bc246..522d321 100644 (file)
@@ -58,12 +58,6 @@ static inline void *phys_to_virt(unsigned long address)
        return __va(address);
 }
 
-/*
- * convert a physical pointer to a virtual kernel pointer for
- * /dev/mem access.
- */
-#define xlate_dev_mem_ptr(p)    __va(p)
-
 /*
  * IO port access primitives.  Hexagon doesn't have special IO access
  * instructions; all I/O is memory mapped.
index 47525f2..090aec5 100644 (file)
@@ -389,12 +389,6 @@ static inline void isa_delay(void)
 
 #define __ARCH_HAS_NO_PAGE_ZERO_MAPPED         1
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
 #define readb_relaxed(addr)    readb(addr)
 #define readw_relaxed(addr)    readw(addr)
 #define readl_relaxed(addr)    readl(addr)
index fe5476c..b086610 100644 (file)
@@ -507,7 +507,6 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
 #define csr_out32(v, a) (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST) = (v))
 #define csr_in32(a)    (*(volatile u32 *)((unsigned long)(a) + __CSR_32_ADJUST))
 
-
 #define __raw_readb __raw_readb
 #define __raw_readw __raw_readw
 #define __raw_readl __raw_readl
@@ -561,14 +560,6 @@ extern void (*_dma_cache_inv)(unsigned long start, unsigned long size);
 #define outsw outsw
 #define outsl outsl
 
-
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-#define unxlate_dev_mem_ptr(p, v) do { } while (0)
-
 void __ioread64_copy(void *to, const void __iomem *from, size_t count);
 
 #include <asm-generic/io.h>
index 48630c7..a63190a 100644 (file)
@@ -265,12 +265,6 @@ extern void iowrite64be(u64 val, void __iomem *addr);
 #define iowrite16_rep iowrite16_rep
 #define iowrite32_rep iowrite32_rep
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
 extern int devmem_is_allowed(unsigned long pfn);
 
 #include <asm-generic/io.h>
index bc624a8..08c550e 100644 (file)
@@ -709,12 +709,6 @@ static inline void name at                                 \
 #define memcpy_fromio memcpy_fromio
 #define memcpy_toio memcpy_toio
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
 /*
  * We don't do relaxed operations yet, at least not with this semantic
  */
index d0b4e07..cf5eab8 100644 (file)
@@ -302,13 +302,6 @@ unsigned long long poke_real_address_q(unsigned long long addr,
        ioremap_prot((addr), (size), pgprot_val(PAGE_KERNEL))
 #endif /* CONFIG_MMU */
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-#define unxlate_dev_mem_ptr(p, v) do { } while (0)
-
 #include <asm-generic/io.h>
 
 #define ARCH_HAS_VALID_PHYS_ADDR_RANGE
index d8ee144..c9528e4 100644 (file)
@@ -469,12 +469,6 @@ static inline int sbus_can_burst64(void)
 struct device;
 void sbus_set_sbus64(struct device *, int);
 
-/*
- * Convert a physical pointer to a virtual kernel pointer for /dev/mem
- * access
- */
-#define xlate_dev_mem_ptr(p)   __va(p)
-
 #endif
 
 #endif /* !(__SPARC64_IO_H) */