Skip to contentSkip to conversation

MIPS: BCM47XX: Declare early_tlb_init() static

PATCH Applied Yongzhen Zhang 3 participants 3 messages Mar 15, 2024 – Apr 15, 2024

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

PATCH 1/1 MIPS: BCM47XX: Declare early_tlb_init() static

early_tlb_init() was local to file but not declared static, leading to error:

arch/mips/bcm47xx/prom.c:126:6: error: no previous prototype for ‘early_tlb_init’ [-Werror=missing-prototypes]
126 | void early_tlb_init(void)

      |      ^~~~~~~~~~~~~~
---
 arch/mips/bcm47xx/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm47xx/prom.c +1 -1
index 7344a5eb990e..58fb7c2dc3b8 100644
@@ -124,7 +124,7 @@ void __init prom_init(void)
 /* Stripped version of tlb_init, with the call to build_tlb_refill_handler
  * dropped. Calling it at this stage causes a hang.
  */
-void early_tlb_init(void)
+static void early_tlb_init(void)
 {
 	write_c0_pagemask(PM_DEFAULT_MASK);
 	write_c0_wired(0);
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Yongzhen Zhang

early_tlb_init() was local to file but not declared static, leading to error:

arch/mips/bcm47xx/prom.c:126:6: error: no previous prototype for ‘early_tlb_init’ [-Werror=missing-prototypes]
126 | void early_tlb_init(void)

       |      ^~~~~~~~~~~~~~
---
  arch/mips/bcm47xx/prom.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
maintainer Applied
#2 lore raw
In reply to Yongzhen Zhang
Quoted 27 lines · Yongzhen Zhang

early_tlb_init() was local to file but not declared static, leading to error:

arch/mips/bcm47xx/prom.c:126:6: error: no previous prototype for ‘early_tlb_init’ [-Werror=missing-prototypes]
126 | void early_tlb_init(void)

      |      ^~~~~~~~~~~~~~
---
 arch/mips/bcm47xx/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/bcm47xx/prom.c +1 -1
index 7344a5eb990e..58fb7c2dc3b8 100644
@@ -124,7 +124,7 @@ void __init prom_init(void)
 /* Stripped version of tlb_init, with the call to build_tlb_refill_handler
  * dropped. Calling it at this stage causes a hang.
  */
-void early_tlb_init(void)
+static void early_tlb_init(void)
 {
 	write_c0_pagemask(PM_DEFAULT_MASK);
 	write_c0_wired(0);
Signature · 1 line
2.34.1

applied to mips-next.

Thomas.

Signature · 2 lines
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]