]> git.baikalelectronics.ru Git - kernel.git/commit
arm64/kernel: Simplify __cpu_up() by bailing out early
authorGavin Shan <gshan@redhat.com>
Mon, 2 Mar 2020 02:03:40 +0000 (13:03 +1100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 17 Mar 2020 18:31:10 +0000 (18:31 +0000)
commit257ea29ba5e6a473ed476a208a5ec7152935bb0b
tree2e4ca8ff5ad224435ba01a6ad8490ce93269db58
parentff7f77ea9db611eed535fd18a51124981ca03479
arm64/kernel: Simplify __cpu_up() by bailing out early

The function __cpu_up() is invoked to bring up the target CPU through
the backend, PSCI for example. The nested if statements won't be needed
if we bail out early on the following two conditions where the status
won't be checked. The code looks simplified in that case.

   * Error returned from the backend (e.g. PSCI)
   * The target CPU has been marked as onlined

Signed-off-by: Gavin Shan <gshan@redhat.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
arch/arm64/kernel/smp.c