nios2: time: Fix build error and warning
PATCH 1/1 nios2: time: Fix build error and warning
nios2 builds fail with
arch/nios2/kernel/time.c: In function 'time_init':arch/nios2/kernel/time.c:354:2: warning:
'return' with a value, in function returning void
include/linux/of.h:999:2: warning:
ISO C90 forbids mixed declarations and code
include/linux/of.h:999:22: error:
expected declaration or statement at end of input
--- arch/nios2/kernel/time.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/nios2/kernel/time.c +1 -3
@@ -346,12 +346,10 @@ void __init time_init(void)for_each_compatible_node (np,NULL ,ALTR_TIMER_COMPATIBLE ) count++; -if (count <2 ) { +if (count <2 )panic ("%d timer is found, it needs 2 timers in system\n" , count);clocksource_probe (); - -return 0 ; }CLOCKSOURCE_OF_DECLARE (nios2_timer,ALTR_TIMER_COMPATIBLE , nios2_time_init);
Signature · 1 line
2.5.0
Quoted 9 lines · Guenter Roeck
nios2 builds fail with
arch/nios2/kernel/time.c: In function 'time_init':arch/nios2/kernel/time.c:354:2: warning:
'return' with a value, in function returning void
include/linux/of.h:999:2: warning:
ISO C90 forbids mixed declarations and code
Quoted 7 lines
include/linux/of.h:999:22: error:
expected declaration or statement at end of inputFixes 2ef9162920dc ("clocksource/drivers/nios2: Convert init function to return error")Cc Daniel Lezcano <[email protected]>Signed-off-by Guenter Roeck <[email protected]>---
Thanks ! I merged this fix with the commit.
-- Daniel
Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook | <http://twitter.com/#!/linaroorg> Twitter | <http://www.linaro.org/linaro-blog/> Blog