Re: [RFC PATCH v2 1/9] arm: avoid using on_each_cpu hard coded retvalue

From: Russell King - ARM Linux
Date: Sun Jan 08 2012 - 11:12:24 EST


On Sun, Jan 08, 2012 at 03:32:21PM +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.
>
> Signed-off-by: Gilad Ben-Yossef <gilad@xxxxxxxxxxxxx>
> Acked-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> Reviewed-by: Michal Nazarewicz <mina86@xxxxxxxxxx>
> CC: Will Deacon <will.deacon@xxxxxxx>
> CC: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> CC: Paul Mackerras <paulus@xxxxxxxxx>
> CC: Ingo Molnar <mingo@xxxxxxx>
> CC: Arnaldo Carvalho de Melo <acme@xxxxxxxxxxxxxxxxxx>
> CC: Russell King <linux@xxxxxxxxxxxxxxxx>

Reviewed-by: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>

> CC: Grant Likely <grant.likely@xxxxxxxxxxxx>
> CC: Rob Herring <rob.herring@xxxxxxxxxxx>
> CC: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> CC: devicetree-discuss@xxxxxxxxxxxxxxxx
> ---
> 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 5bb91bf..6e9acb7 100644
> --- a/arch/arm/kernel/perf_event.c
> +++ b/arch/arm/kernel/perf_event.c
> @@ -616,7 +616,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);

There's not much to review here...

Thanks.

> return 0;
> }
> arch_initcall(cpu_pmu_reset);
> --
> 1.7.0.4
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/