[tip: sched/core] sched: Remove unneeed macro wrap

From: tip-bot2 for Michal Koutný
Date: Tue Apr 08 2025 - 15:10:09 EST


The following commit has been merged into the sched/core branch of tip:

Commit-ID: e285313f0848157cc3c6827d233a2510167b50cf
Gitweb: https://git.kernel.org/tip/e285313f0848157cc3c6827d233a2510167b50cf
Author: Michal Koutný <mkoutny@xxxxxxxx>
AuthorDate: Mon, 10 Mar 2025 18:04:34 +01:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 08 Apr 2025 20:55:53 +02:00

sched: Remove unneeed macro wrap

rt_entity_is_task has split definitions based on CONFIG_RT_GROUP_SCHED,
therefore we can use it always. No functional change intended.

Signed-off-by: Michal Koutný <mkoutny@xxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Link: https://lkml.kernel.org/r/20250310170442.504716-3-mkoutny@xxxxxxxx
---
kernel/sched/rt.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 2ade81e..61ec29b 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -1255,11 +1255,9 @@ static void __delist_rt_entity(struct sched_rt_entity *rt_se, struct rt_prio_arr
static inline struct sched_statistics *
__schedstats_from_rt_se(struct sched_rt_entity *rt_se)
{
-#ifdef CONFIG_RT_GROUP_SCHED
/* schedstats is not supported for rt group. */
if (!rt_entity_is_task(rt_se))
return NULL;
-#endif

return &rt_task_of(rt_se)->stats;
}