On Tue, Jan 03, 2012 at 04:19:05PM +0200, Gilad Ben-Yossef wrote:
> on_each_cpu always returns a hard coded return code of zero.
> 
> Removing all tests based on this return value saves run time
> cycles for compares and code bloat for branches.
> 
> Cc: Michal Nazarewicz <[email protected]>
> CC: Will Deacon <[email protected]>
> CC: Peter Zijlstra <[email protected]>
> CC: Paul Mackerras <[email protected]>
> CC: Ingo Molnar <[email protected]>
> CC: Arnaldo Carvalho de Melo <[email protected]>
> CC: Russell King <[email protected]>
> CC: Grant Likely <[email protected]>
> CC: Rob Herring <[email protected]>
> CC: [email protected]
> CC: [email protected]
> ---
>  arch/arm/kernel/perf_event.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/kernel/perf_event.c b/arch/arm/kernel/perf_event.c
> index 88b0941..bfd58d8 100644
> --- a/arch/arm/kernel/perf_event.c
> +++ b/arch/arm/kernel/perf_event.c
> @@ -617,7 +617,7 @@ static int __init
>  cpu_pmu_reset(void)
>  {
>       if (cpu_pmu && cpu_pmu->reset)
> -             return on_each_cpu(cpu_pmu->reset, NULL, 1);
> +             on_each_cpu(cpu_pmu->reset, NULL, 1);
>       return 0;
>  }
>  arch_initcall(cpu_pmu_reset);
This patch results in no binary change for my test build with SMP=n and
it saves one instruction on SMP=y.

Acked-by: Uwe Kleine-König <[email protected]>

Thanks
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
_______________________________________________
devicetree-discuss mailing list
[email protected]
https://lists.ozlabs.org/listinfo/devicetree-discuss

Reply via email to