Skip to contentSkip to conversation

mm/early_ioremap.c: remove redundant early_ioremap_shutdown()

PATCH Applied Weizhao Ouyang 2 participants 2 messages Sep 1, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mm/early_ioremap.c: remove redundant early_ioremap_shutdown()

early_ioremap_reset() reserved a weak function so that architectures can provide a specific cleanup. Now no architectures use it, remove this redundant function.

---
 include/asm-generic/early_ioremap.h | 6 ------
 mm/early_ioremap.c                  | 5 -----
 2 files changed, 11 deletions(-)
include/asm-generic/early_ioremap.h +0 -6
index 9def22e6e2b3..9d0479f50f97 100644
@@ -19,12 +19,6 @@ extern void *early_memremap_prot(resource_size_t phys_addr,
 extern void early_iounmap(void __iomem *addr, unsigned long size);
 extern void early_memunmap(void *addr, unsigned long size);
 
-/*
- * Weak function called by early_ioremap_reset(). It does nothing, but
- * architectures may provide their own version to do any needed cleanups.
- */
-extern void early_ioremap_shutdown(void);
-
 #if defined(CONFIG_GENERIC_EARLY_IOREMAP) && defined(CONFIG_MMU)
 /* Arch-specific initialization */
 extern void early_ioremap_init(void);
mm/early_ioremap.c +0 -5
index 164607c7cdf1..74984c23a87e 100644
@@ -38,13 +38,8 @@ pgprot_t __init __weak early_memremap_pgprot_adjust(resource_size_t phys_addr,
 	return prot;
 }
 
-void __init __weak early_ioremap_shutdown(void)
-{
-}
-
 void __init early_ioremap_reset(void)
 {
-	early_ioremap_shutdown();
 	after_paging_init = 1;
 }
 
Signature · 1 line
2.30.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 36 lines · Weizhao Ouyang

early_ioremap_reset() reserved a weak function so that architectures can provide a specific cleanup. Now no architectures use it, remove this redundant function.

---
  include/asm-generic/early_ioremap.h | 6 ------
  mm/early_ioremap.c                  | 5 -----
  2 files changed, 11 deletions(-)
include/asm-generic/early_ioremap.h +0 -6
index 9def22e6e2b3..9d0479f50f97 100644
@@ -19,12 +19,6 @@ extern void *early_memremap_prot(resource_size_t phys_addr,
  extern void early_iounmap(void __iomem *addr, unsigned long size);
  extern void early_memunmap(void *addr, unsigned long size);
 
-/*
- * Weak function called by early_ioremap_reset(). It does nothing, but
- * architectures may provide their own version to do any needed cleanups.
- */
-extern void early_ioremap_shutdown(void);
-
  #if defined(CONFIG_GENERIC_EARLY_IOREMAP) && defined(CONFIG_MMU)
  /* Arch-specific initialization */
  extern void early_ioremap_init(void);
mm/early_ioremap.c +0 -0
index 164607c7cdf1..74984c23a87e 100644
@@ -38,13 +38,8 @@ pgprot_t __init __weak early_memremap_pgprot_adjust(resource_size_t phys_addr,
  	return prot;
  }
 

mm/early_ioremap.c pgprot_t __init __weak early_memremap_pgprot_adjust(resource_size_t phys_addr, · line 45

Quoted 10 lines
mm/early_ioremap.c +0 -5
-void __init __weak early_ioremap_shutdown(void)
-{
-}
-
  void __init early_ioremap_reset(void)
  {
-	early_ioremap_shutdown();
  	after_paging_init = 1;
  }
 
Signature · 3 lines
Thanks,

David / dhildenb