public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it
@ 2025-01-27  9:53 Yuntao Wang
  0 siblings, 0 replies; only message in thread
From: Yuntao Wang @ 2025-01-27  9:53 UTC (permalink / raw)
  To: linux-kernel
  Cc: Tejun Heo, Frederic Weisbecker, Thomas Gleixner, Petr Mladek,
	Hao Luo, David Vernet, Paul E. McKenney, Wardenjohn, Yuntao Wang

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


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2025-01-27  9:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-27  9:53 [PATCH] init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it Yuntao Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox