* [U-Boot] [PATCH] avr32: fix timer_init() return type
@ 2011-10-13 5:11 Mike Frysinger
2011-10-13 7:38 ` Andreas Bießmann
0 siblings, 1 reply; 5+ messages in thread
From: Mike Frysinger @ 2011-10-13 5:11 UTC (permalink / raw)
To: u-boot
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 <vapier@gentoo.org>
---
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;
/* For all practical purposes, this gives us an overflow interrupt */
sysreg_write(COMPARE, 0xffffffff);
+
+ return 0;
}
--
1.7.6.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] avr32: fix timer_init() return type
2011-10-13 5:11 [U-Boot] [PATCH] avr32: fix timer_init() return type Mike Frysinger
@ 2011-10-13 7:38 ` Andreas Bießmann
2011-10-13 10:27 ` Reinhard Meyer
0 siblings, 1 reply; 5+ messages in thread
From: Andreas Bießmann @ 2011-10-13 7:38 UTC (permalink / raw)
To: u-boot
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 <vapier@gentoo.org>
> ---
> 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] avr32: fix timer_init() return type
2011-10-13 7:38 ` Andreas Bießmann
@ 2011-10-13 10:27 ` Reinhard Meyer
2011-10-13 15:29 ` Mike Frysinger
2011-11-29 9:10 ` Andreas Bießmann
0 siblings, 2 replies; 5+ messages in thread
From: Reinhard Meyer @ 2011-10-13 10:27 UTC (permalink / raw)
To: u-boot
Dear Andreas Bie?mann,
>> 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).
Agreed
>
> BTW there is another patch pending ->
> http://patchwork.ozlabs.org/patch/117688/
I'll apply that one in the year 2015 ;)
NO.. its on my list for applying into next
Best Regards,
Reinhard
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] avr32: fix timer_init() return type
2011-10-13 10:27 ` Reinhard Meyer
@ 2011-10-13 15:29 ` Mike Frysinger
2011-11-29 9:10 ` Andreas Bießmann
1 sibling, 0 replies; 5+ messages in thread
From: Mike Frysinger @ 2011-10-13 15:29 UTC (permalink / raw)
To: u-boot
On Thursday 13 October 2011 06:27:38 Reinhard Meyer wrote:
> Dear Andreas Bie?mann,
> > BTW there is another patch pending ->
> > http://patchwork.ozlabs.org/patch/117688/
>
> I'll apply that one in the year 2015 ;)
>
> NO.. its on my list for applying into next
WFM
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111013/1dd36bb2/attachment.pgp
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] [PATCH] avr32: fix timer_init() return type
2011-10-13 10:27 ` Reinhard Meyer
2011-10-13 15:29 ` Mike Frysinger
@ 2011-11-29 9:10 ` Andreas Bießmann
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Bießmann @ 2011-11-29 9:10 UTC (permalink / raw)
To: u-boot
Dear Reinhard,
Am 13.10.2011 12:27, schrieb Reinhard Meyer:
> Dear Andreas Bie?mann,
>>> 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).
>
> Agreed
>
>>
>> BTW there is another patch pending ->
>> http://patchwork.ozlabs.org/patch/117688/
>
> I'll apply that one in the year 2015 ;)
>
> NO.. its on my list for applying into next
it would be great to get this regression fix (or the other one) in now.
best regards
Andreas Bie?mann
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-11-29 9:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-13 5:11 [U-Boot] [PATCH] avr32: fix timer_init() return type Mike Frysinger
2011-10-13 7:38 ` Andreas Bießmann
2011-10-13 10:27 ` Reinhard Meyer
2011-10-13 15:29 ` Mike Frysinger
2011-11-29 9:10 ` Andreas Bießmann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox