Re: [PATCH] powerpc: Remove leftover cputime_to_nsecs call causing build error

From: Michael Ellerman
Date: Wed Feb 22 2017 - 16:36:22 EST


Frederic Weisbecker <fweisbec@xxxxxxxxx> writes:

> This type conversion is a leftover that got ignored during the kcpustat
> conversion to nanosecs, resulting in build breakage with config having
> CONFIG_NO_HZ_FULL=y.
>
> arch/powerpc/kernel/time.c: In function 'running_clock':
> arch/powerpc/kernel/time.c:712:2: error: implicit declaration of function 'cputime_to_nsecs' [-Werror=implicit-function-declaration]
> return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]);
>
> All we need is to remove it.
>
> Reported-by: Abdul Haleem <abdhalee@xxxxxxxxxxxxxxxxxx>
> Cc: Michael Ellerman <mpe@xxxxxxxxxxxxxx>
> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> Cc: Paul Mackerras <paulus@xxxxxxxxx>
> Cc: Oliver O'Halloran <oohall@xxxxxxxxx>
> Cc: linuxppc-dev@xxxxxxxxxxxxxxxx
> Signed-off-by: Frederic Weisbecker <fweisbec@xxxxxxxxx>

LGTM.

Acked-by: Michael Ellerman <mpe@xxxxxxxxxxxxxx>


Are you going to send this to Linus, or should I?

cheers


> diff --git a/arch/powerpc/kernel/time.c b/arch/powerpc/kernel/time.c
> index 14e4855..bc84a8d 100644
> --- a/arch/powerpc/kernel/time.c
> +++ b/arch/powerpc/kernel/time.c
> @@ -709,7 +709,7 @@ unsigned long long running_clock(void)
> * time and on a host which doesn't do any virtualisation TB *should* equal
> * VTB so it makes no difference anyway.
> */
> - return local_clock() - cputime_to_nsecs(kcpustat_this_cpu->cpustat[CPUTIME_STEAL]);
> + return local_clock() - kcpustat_this_cpu->cpustat[CPUTIME_STEAL];
> }
> #endif
>
> --
> 2.7.4