Skip to contentSkip to conversation

init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it

PATCH New Yuntao Wang 1 participant 1 message Jan 27, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it

There is already a DEFAULT_PRIO macro, which is equal to 'MAX_PRIO - 20'.

We can use it directly in init_task instead of open-coding it.

---
 init/init_task.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
init/init_task.c +3 -3
index e557f622bd90..5933f5dddc3e 100644
@@ -72,9 +72,9 @@ struct task_struct init_task __aligned(L1_CACHE_BYTES) = {
 	.stack		= init_stack,
 	.usage		= REFCOUNT_INIT(2),
 	.flags		= PF_KTHREAD,
-	.prio		= MAX_PRIO - 20,
-	.static_prio	= MAX_PRIO - 20,
-	.normal_prio	= MAX_PRIO - 20,
+	.prio		= DEFAULT_PRIO,
+	.static_prio	= DEFAULT_PRIO,
+	.normal_prio	= DEFAULT_PRIO,
 	.policy		= SCHED_NORMAL,
 	.cpus_ptr	= &init_task.cpus_mask,
 	.user_cpus_ptr	= NULL,
Signature · 1 line
2.47.1