diff mbox

[U-Boot,RESEND] mpc85xx: Fix a compiler warning when CONFIG_WATCHDOG is turned on

Message ID 1363175243-12183-1-git-send-email-hkronsto@frequentis.com
State Changes Requested
Delegated to: Wolfgang Denk
Headers show

Commit Message

Horst Kronstorfer March 13, 2013, 11:47 a.m. UTC
cpu.c:288:2:
warning: implicit declaration of function 'reset_85xx_watchdog'
[-Wimplicit-function-declaration]

Signed-off-by: Horst Kronstorfer <hkronsto@frequentis.com>
---
 arch/powerpc/cpu/mpc85xx/cpu.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Wolfgang Denk March 13, 2013, 4:09 p.m. UTC | #1
Dear Horst Kronstorfer,

In message <1363175243-12183-1-git-send-email-hkronsto@frequentis.com> you wrote:
> cpu.c:288:2:
> warning: implicit declaration of function 'reset_85xx_watchdog'
> [-Wimplicit-function-declaration]
...
> +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
diff mbox

Patch

diff --git a/arch/powerpc/cpu/mpc85xx/cpu.c b/arch/powerpc/cpu/mpc85xx/cpu.c
index df2ab6d..0f2d867 100644
--- a/arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/arch/powerpc/cpu/mpc85xx/cpu.c
@@ -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 */
 
 /*