summaryrefslogtreecommitdiff
path: root/arch/sparc/kernel/process_32.c
diff options
context:
space:
mode:
authorPeter Zijlstra <peterz@infradead.org>2021-06-11 11:28:12 +0300
committerPeter Zijlstra <peterz@infradead.org>2021-06-18 12:43:07 +0300
commitb03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6 (patch)
treeaa8a970bc1cf036c71a1c3201a0cd0ed8fb66636 /arch/sparc/kernel/process_32.c
parent37aadc687ab441bbcb693ddae613acf9afcea1ab (diff)
downloadlinux-b03fbd4ff24c5f075e58eb19261d5f8b3e40d7c6.tar.xz
sched: Introduce task_is_running()
Replace a bunch of 'p->state == TASK_RUNNING' with a new helper: task_is_running(p). Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Acked-by: Davidlohr Bueso <dave@stgolabs.net> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20210611082838.222401495@infradead.org
Diffstat (limited to 'arch/sparc/kernel/process_32.c')
-rw-r--r--arch/sparc/kernel/process_32.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/sparc/kernel/process_32.c b/arch/sparc/kernel/process_32.c
index 3b9794978e5b..93983d6d431d 100644
--- a/arch/sparc/kernel/process_32.c
+++ b/arch/sparc/kernel/process_32.c
@@ -376,8 +376,7 @@ unsigned long get_wchan(struct task_struct *task)
struct reg_window32 *rw;
int count = 0;
- if (!task || task == current ||
- task->state == TASK_RUNNING)
+ if (!task || task == current || task_is_running(task))
goto out;
fp = task_thread_info(task)->ksp + bias;