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

Yuntao Wang posted 1 patch 2 days, 22 hours ago
init/init_task.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
[PATCH] init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it
Posted by Yuntao Wang 2 days, 22 hours ago
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.

Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev>
---
 init/init_task.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/init/init_task.c b/init/init_task.c
index e557f622bd90..5933f5dddc3e 100644
--- a/init/init_task.c
+++ b/init/init_task.c
@@ -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,
-- 
2.47.1