]> 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)
commit0c982008baf4aeebc7cfd82ddad291720af43c23
tree2e4ca8ff5ad224435ba01a6ad8490ce93269db58
parent00893777e12cbf23142e003703315538105d5aa6
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