summaryrefslogtreecommitdiff
path: root/include/linux/sched/deadline.h
diff options
context:
space:
mode:
authorQais Yousef <qyousef@layalina.io>2024-06-10 22:20:17 +0300
committerPeter Zijlstra <peterz@infradead.org>2024-08-07 19:32:38 +0300
commitb166af3db70fdcecf125662a2360471bb20be203 (patch)
tree432c5ce81e0fb873dc8933cf970b56eabb541451 /include/linux/sched/deadline.h
parent130fd056dd82b02db9a661c013071af35309be1a (diff)
downloadlinux-b166af3db70fdcecf125662a2360471bb20be203.tar.xz
sched/rt, dl: Convert functions to return bool
{rt, realtime, dl}_{task, prio}() functions' return value is actually a bool. Convert their return type to reflect that. Suggested-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> Signed-off-by: Qais Yousef <qyousef@layalina.io> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: "Steven Rostedt (Google)" <rostedt@goodmis.org> Reviewed-by: Metin Kaya <metin.kaya@arm.com> Link: https://lore.kernel.org/r/20240610192018.1567075-3-qyousef@layalina.io
Diffstat (limited to 'include/linux/sched/deadline.h')
-rw-r--r--include/linux/sched/deadline.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/include/linux/sched/deadline.h b/include/linux/sched/deadline.h
index 5cb88b748ad6..3a912ab42bb5 100644
--- a/include/linux/sched/deadline.h
+++ b/include/linux/sched/deadline.h
@@ -10,18 +10,16 @@
#include <linux/sched.h>
-static inline int dl_prio(int prio)
+static inline bool dl_prio(int prio)
{
- if (unlikely(prio < MAX_DL_PRIO))
- return 1;
- return 0;
+ return unlikely(prio < MAX_DL_PRIO);
}
/*
* Returns true if a task has a priority that belongs to DL class. PI-boosted
* tasks will return true. Use dl_policy() to ignore PI-boosted tasks.
*/
-static inline int dl_task(struct task_struct *p)
+static inline bool dl_task(struct task_struct *p)
{
return dl_prio(p->prio);
}