From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?B?QW5kcmVhcyBCaWXDn21hbm4=?= Date: Thu, 13 Oct 2011 09:38:05 +0200 Subject: [U-Boot] [PATCH] avr32: fix timer_init() return type In-Reply-To: <1318482666-20394-1-git-send-email-vapier@gentoo.org> References: <1318482666-20394-1-git-send-email-vapier@gentoo.org> Message-ID: <4E96955D.8080407@corscience.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Mike, Am 13.10.2011 07:11, schrieb Mike Frysinger: > The common.h header says this has to return an int, otherwise we get > build failures due to mismatched prototype and function definition. > > Signed-off-by: Mike Frysinger > --- > arch/avr32/cpu/interrupts.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/arch/avr32/cpu/interrupts.c b/arch/avr32/cpu/interrupts.c > index 6681e13..1127580 100644 > --- a/arch/avr32/cpu/interrupts.c > +++ b/arch/avr32/cpu/interrupts.c > @@ -107,7 +107,7 @@ static int set_interrupt_handler(unsigned int nr, void (*handler)(void), > return 0; > } > > -void timer_init(void) > +int timer_init(void) > { > extern void timer_interrupt_handler(void); > u64 tmp; > @@ -120,8 +120,10 @@ void timer_init(void) > tb_factor = (u32)tmp; > > if (set_interrupt_handler(0, &timer_interrupt_handler, 3)) > - return; > + return 0; NAK, this is an error and should return a negative value (though the return value is currently not evaluated). BTW there is another patch pending -> http://patchwork.ozlabs.org/patch/117688/ best regards Andreas Bie?mann