mpc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on
PATCH RESEND 1/1 mpc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on
cpu.c:288:2:
warning: implicit declaration of function 'reset_85xx_watchdog' [-Wimplicit-function-declaration]
--- arch/powerpc/cpu/mpc85xx/cpu.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +8 -8
@@ -282,14 +282,6 @@ unsigned long get_tbclk (void)#if defined(CONFIG_WATCHDOG )void -watchdog_reset (void ) -{ -int re_enable =disable_interrupts (); -reset_85xx_watchdog (); -if (re_enable)enable_interrupts (); -} - -void reset_85xx_watchdog (void ) {/*
@@ -297,6 +289,14 @@ reset_85xx_watchdog(void)*/ mtspr(SPRN_TSR, TSR_WIS); } + +void +watchdog_reset (void ) +{ +int re_enable =disable_interrupts (); +reset_85xx_watchdog (); +if (re_enable)enable_interrupts (); +}#endif /* CONFIG_WATCHDOG */ /*
Signature · 1 line
1.8.1.5
PATCH RESEND 1/1 mpc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on
Dear Horst Kronstorfer,
Quoted 3 lines · In message <[email protected]> you…
cpu.c:288:2:
warning: implicit declaration of function 'reset_85xx_watchdog' [-Wimplicit-function-declaration]
...
arch/powerpc/cpu/mpc85xx/cpu.c reset_85xx_watchdog(void) · line 299
Quoted 7 lines
arch/powerpc/cpu/mpc85xx/cpu.c +7
-0+void +watchdog_reset (void ) +{ +int re_enable =disable_interrupts (); +reset_85xx_watchdog (); +if (re_enable)enable_interrupts (); +}
When changing code, please fix the formatting as needed. Here:
please add a blank line after the declarations, and put the "enable_interrupts();" correctly indented on a new line.
And please start running your patches through checkpatch before submitting - it would have complained, too:
ERROR: trailing statements should be on next line
#123: FILE: arch/powerpc/cpu/mpc85xx/cpu.c:298:
+ if (re_enable) enable_interrupts();
Thanks.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de We are Microsoft. Unix is irrelevant. Openness is futile. Prepare to be assimilated.
PATCH v2 1/1 mpc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on
In reply to Horst Kronstorfercpu.c:288:2:
warning: implicit declaration of function 'reset_85xx_watchdog' [-Wimplicit-function-declaration]
---
Changes for v2:
- Fix formatting
- Fix checkpatch findings
arch/powerpc/cpu/mpc85xx/cpu.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-)
arch/powerpc/cpu/mpc85xx/cpu.c +10 -8
@@ -282,14 +282,6 @@ unsigned long get_tbclk (void)#if defined(CONFIG_WATCHDOG )void -watchdog_reset (void ) -{ -int re_enable =disable_interrupts (); -reset_85xx_watchdog (); -if (re_enable)enable_interrupts (); -} - -void reset_85xx_watchdog (void ) {/*
@@ -297,6 +289,16 @@ reset_85xx_watchdog(void)*/ mtspr(SPRN_TSR, TSR_WIS); } + +void +watchdog_reset (void ) +{ +int re_enable =disable_interrupts (); + +reset_85xx_watchdog (); +if (re_enable) +enable_interrupts (); +}#endif /* CONFIG_WATCHDOG */ /*
Signature · 1 line
1.8.1.5