diff mbox series

MIPS: mm: remove function __uncached_access()

Message ID 20210123055926.4137197-1-siyanteng@loongson.cn (mailing list archive)
State Superseded
Headers show
Series MIPS: mm: remove function __uncached_access() | expand

Commit Message

Yanteng Si Jan. 23, 2021, 5:59 a.m. UTC
Remove unnecessary functions.

Signed-off-by: Yanteng Si <siyanteng@loongson.cn>
---
 arch/mips/loongson2ef/common/mem.c | 11 -----------
 arch/mips/mm/cache.c               |  8 --------
 drivers/char/mem.c                 |  7 -------
 3 files changed, 26 deletions(-)

Comments

Greg KH Jan. 23, 2021, 8:02 a.m. UTC | #1
On Sat, Jan 23, 2021 at 01:59:26PM +0800, Yanteng Si wrote:
> Remove unnecessary functions.
> 

Why is it unnecessary?  Please explain more as this looks to be removing
logic...

thanks,

greg k-h
Greg KH Jan. 24, 2021, 8:15 a.m. UTC | #2
On Sun, Jan 24, 2021 at 03:51:48PM +0800, yanteng si wrote:
> hi,Greg
> 
> I have sent patch v2,  please pay attention!

*plonk*
Greg KH Jan. 24, 2021, 2:05 p.m. UTC | #3
On Sun, Jan 24, 2021 at 09:53:54PM +0800, yanteng si wrote:
> Hi Greg,
> 
> Apologies for my terminology, I was intending to make a kind reminder but
> selected the wrong wording. :-(
> 
> I will try to improve my English skills to avoid that in future.
> 
> Apologize again for the harshness.

Not a problem, I understand the difficulty of trying to communicate in
a second language very well.

greg k-h
diff mbox series

Patch

diff --git a/arch/mips/loongson2ef/common/mem.c b/arch/mips/loongson2ef/common/mem.c
index 057d58bb470e..fceb3ee47eb0 100644
--- a/arch/mips/loongson2ef/common/mem.c
+++ b/arch/mips/loongson2ef/common/mem.c
@@ -41,14 +41,3 @@  void __init prom_init_memory(void)
 		memblock_add(LOONGSON_HIGHMEM_START, highmemsize << 20);
 #endif /* !CONFIG_64BIT */
 }
-
-/* override of arch/mips/mm/cache.c: __uncached_access */
-int __uncached_access(struct file *file, unsigned long addr)
-{
-	if (file->f_flags & O_DSYNC)
-		return 1;
-
-	return addr >= __pa(high_memory) ||
-		((addr >= LOONGSON_MMIO_MEM_START) &&
-		 (addr < LOONGSON_MMIO_MEM_END));
-}
diff --git a/arch/mips/mm/cache.c b/arch/mips/mm/cache.c
index 23b16bfd97b2..9cfd432d99f6 100644
--- a/arch/mips/mm/cache.c
+++ b/arch/mips/mm/cache.c
@@ -207,11 +207,3 @@  void cpu_cache_init(void)
 
 	setup_protection_map();
 }
-
-int __weak __uncached_access(struct file *file, unsigned long addr)
-{
-	if (file->f_flags & O_DSYNC)
-		return 1;
-
-	return addr >= __pa(high_memory);
-}
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index 43c871dc7477..869b9f5e8e03 100644
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -291,13 +291,6 @@  static int uncached_access(struct file *file, phys_addr_t addr)
 	 * attribute aliases.
 	 */
 	return !(efi_mem_attributes(addr) & EFI_MEMORY_WB);
-#elif defined(CONFIG_MIPS)
-	{
-		extern int __uncached_access(struct file *file,
-					     unsigned long addr);
-
-		return __uncached_access(file, addr);
-	}
 #else
 	/*
 	 * Accessing memory above the top the kernel knows about or through a