On Sat, 22 Aug 2009 17:33:46 +0200 Ingo Molnar <mingo@xxxxxxx> wrote: > > * Martin Schwidefsky <schwidefsky@xxxxxxxxxx> wrote: > > > > FYI, -tip arch-testing found that this commit broke the PowerPC > > > build: > > > > > > /home/mingo/tip/arch/powerpc/kernel/time.c: In function 'read_persistent_clock': > > > /home/mingo/tip/arch/powerpc/kernel/time.c:788: error: 'return' with a value, in function returning void > > > /home/mingo/tip/arch/powerpc/kernel/time.c:791: error: 'return' with a value, in function returning void > > > make[2]: *** [arch/powerpc/kernel/time.o] Error 1 > > > make[2]: *** Waiting for unfinished jobs.... > > > make[1]: *** [arch/powerpc/kernel] Error 2 > > > > I overlooked a case in the powerpc version of read_persistent_lock. > > New patch: > > the patches are already committed and this patch doesnt apply - mind > sending a delta fix against tip:master: > > http://people.redhat.com/mingo/tip.git/README Here we go: -- Subject: [PATCH] powerpc: build fix for read_persistent_clock From: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> Fix the following build problem on powerpc: arch/powerpc/kernel/time.c: In function 'read_persistent_clock': arch/powerpc/kernel/time.c:788: error: 'return' with a value, in function returning void arch/powerpc/kernel/time.c:791: error: 'return' with a value, in function returning void make[2]: *** [arch/powerpc/kernel/time.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [arch/powerpc/kernel] Error 2 Signed-off-by: Martin Schwidefsky <schwidefsky@xxxxxxxxxx> --- arch/powerpc/kernel/time.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) Index: linux-2.6/arch/powerpc/kernel/time.c =================================================================== --- linux-2.6.orig/arch/powerpc/kernel/time.c +++ linux-2.6/arch/powerpc/kernel/time.c @@ -774,6 +774,7 @@ void read_persistent_clock(struct timesp struct rtc_time tm; static int first = 1; + ts->tv_nsec = 0; /* XXX this is a litle fragile but will work okay in the short term */ if (first) { first = 0; @@ -781,15 +782,18 @@ void read_persistent_clock(struct timesp timezone_offset = ppc_md.time_init(); /* get_boot_time() isn't guaranteed to be safe to call late */ - if (ppc_md.get_boot_time) - return ppc_md.get_boot_time() -timezone_offset; + if (ppc_md.get_boot_time) { + ts->tv_sec = ppc_md.get_boot_time() -timezone_offset; + return; + } + } + if (!ppc_md.get_rtc_time) { + ts->tv_sec = 0; + return; } - if (!ppc_md.get_rtc_time) - return 0; ppc_md.get_rtc_time(&tm); ts->tv_sec = mktime(tm.tm_year+1900, tm.tm_mon+1, tm.tm_mday, tm.tm_hour, tm.tm_min, tm.tm_sec); - ts->tv_nsec = 0; } /* clocksource code */ -- blue skies, Martin. "Reality continues to ruin my life." - Calvin. -- To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html
![]() |