[PATCH 0/2] sched: Return NULL when entity isn't a task
From: Yajun Deng
Date: Thu Nov 30 2023 - 21:27:50 EST
If the entity isn't a task, return the task struct is meaningless.
Return NULL when entity isn't a task that makes the code more concise.
Yajun Deng (2):
sched/fair: Return NULL when entity isn't a task in task_of()
sched/rt: Return NULL when rt entity isn't a task in rt_task_of()
kernel/sched/fair.c | 50 +++++++++++++++++------------------
kernel/sched/rt.c | 62 ++++++++++++--------------------------------
kernel/sched/sched.h | 4 ++-
3 files changed, 44 insertions(+), 72 deletions(-)
--
2.25.1