diff mbox series

MIPS: BCM47XX: Declare early_tlb_init() static

Message ID 20240315025235.182866-1-zhangyongzhen@kylinos.cn (mailing list archive)
State Accepted
Commit d18419cd66835c29ac732624324b99b43f4cff1c
Headers show
Series MIPS: BCM47XX: Declare early_tlb_init() static | expand

Commit Message

Yongzhen Zhang March 15, 2024, 2:52 a.m. UTC
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)
      |      ^~~~~~~~~~~~~~

Signed-off-by: Yongzhen Zhang <zhangyongzhen@kylinos.cn>
---
 arch/mips/bcm47xx/prom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Philippe Mathieu-Daudé April 8, 2024, 6:54 a.m. UTC | #1
On 15/3/24 03:52, Yongzhen Zhang wrote:
> 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)
>        |      ^~~~~~~~~~~~~~
> 
> Signed-off-by: Yongzhen Zhang <zhangyongzhen@kylinos.cn>
> ---
>   arch/mips/bcm47xx/prom.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Thomas Bogendoerfer April 15, 2024, 8:33 a.m. UTC | #2
On Fri, Mar 15, 2024 at 10:52:35AM +0800, Yongzhen Zhang wrote:
> 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)
>       |      ^~~~~~~~~~~~~~
> 
> Signed-off-by: Yongzhen Zhang <zhangyongzhen@kylinos.cn>
> ---
>  arch/mips/bcm47xx/prom.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
> index 7344a5eb990e..58fb7c2dc3b8 100644
> --- a/arch/mips/bcm47xx/prom.c
> +++ b/arch/mips/bcm47xx/prom.c
> @@ -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);
> -- 
> 2.34.1

applied to mips-next.

Thomas.
diff mbox series

Patch

diff --git a/arch/mips/bcm47xx/prom.c b/arch/mips/bcm47xx/prom.c
index 7344a5eb990e..58fb7c2dc3b8 100644
--- a/arch/mips/bcm47xx/prom.c
+++ b/arch/mips/bcm47xx/prom.c
@@ -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);