arm64: fpsimd: Simplify uses of {set,clear}_ti_thread_flag()
authorDave Martin <[email protected]>
Tue, 31 Oct 2017 15:50:59 +0000 (15:50 +0000)
committerWill Deacon <[email protected]>
Fri, 3 Nov 2017 15:24:13 +0000 (15:24 +0000)
The existing FPSIMD context switch code contains a couple of
instances of {set,clear}_ti_thread(task_thread_info(task)).  Since
there are thread flag manipulators that operate directly on
task_struct, this verbosity isn't strictly needed.

For consistency, this patch simplifies the affected calls.  This
should have no impact on behaviour.

Signed-off-by: Dave Martin <[email protected]>
Reviewed-by: Alex BennĂ©e <[email protected]>
Reviewed-by: Catalin Marinas <[email protected]>
Acked-by: Ard Biesheuvel <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
arch/arm64/kernel/fpsimd.c

index 82786b18ff266c24cb236cfae6dc563a3a278c2e..901078a9cbe5be8eec38e2facaf6801e4cbea34b 100644 (file)
@@ -160,11 +160,9 @@ void fpsimd_thread_switch(struct task_struct *next)
 
                if (__this_cpu_read(fpsimd_last_state) == st
                    && st->cpu == smp_processor_id())
-                       clear_ti_thread_flag(task_thread_info(next),
-                                            TIF_FOREIGN_FPSTATE);
+                       clear_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE);
                else
-                       set_ti_thread_flag(task_thread_info(next),
-                                          TIF_FOREIGN_FPSTATE);
+                       set_tsk_thread_flag(next, TIF_FOREIGN_FPSTATE);
        }
 }