mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-27 22:51:31 +00:00
arm64/fp: Reindent fpsimd_save()
Currently all the active code in fpsimd_save() is inside a check for TIF_FOREIGN_FPSTATE. Reduce the indentation level by changing to return from the function if TIF_FOREIGN_FPSTATE is set. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20211019172247.3045838-2-broonie@kernel.org Signed-off-by: Will Deacon <will@kernel.org>
This commit is contained in:
parent
5816b3e657
commit
2d481bd3b6
1 changed files with 19 additions and 17 deletions
|
@ -308,7 +308,9 @@ static void fpsimd_save(void)
|
||||||
WARN_ON(!system_supports_fpsimd());
|
WARN_ON(!system_supports_fpsimd());
|
||||||
WARN_ON(!have_cpu_fpsimd_context());
|
WARN_ON(!have_cpu_fpsimd_context());
|
||||||
|
|
||||||
if (!test_thread_flag(TIF_FOREIGN_FPSTATE)) {
|
if (test_thread_flag(TIF_FOREIGN_FPSTATE))
|
||||||
|
return;
|
||||||
|
|
||||||
if (IS_ENABLED(CONFIG_ARM64_SVE) &&
|
if (IS_ENABLED(CONFIG_ARM64_SVE) &&
|
||||||
test_thread_flag(TIF_SVE)) {
|
test_thread_flag(TIF_SVE)) {
|
||||||
if (WARN_ON(sve_get_vl() != last->sve_vl)) {
|
if (WARN_ON(sve_get_vl() != last->sve_vl)) {
|
||||||
|
@ -324,7 +326,7 @@ static void fpsimd_save(void)
|
||||||
sve_save_state((char *)last->sve_state +
|
sve_save_state((char *)last->sve_state +
|
||||||
sve_ffr_offset(last->sve_vl),
|
sve_ffr_offset(last->sve_vl),
|
||||||
&last->st->fpsr);
|
&last->st->fpsr);
|
||||||
} else
|
} else {
|
||||||
fpsimd_save_state(last->st);
|
fpsimd_save_state(last->st);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue