public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Yuntao Wang <yuntao.wang@linux.dev>
To: linux-kernel@vger.kernel.org
Cc: Tejun Heo <tj@kernel.org>,
	Frederic Weisbecker <frederic@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Petr Mladek <pmladek@suse.com>, Hao Luo <haoluo@google.com>,
	David Vernet <dvernet@meta.com>,
	"Paul E. McKenney" <paulmck@kernel.org>,
	Wardenjohn <zhangwarden@gmail.com>,
	Yuntao Wang <yuntao.wang@linux.dev>
Subject: [PATCH] init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it
Date: Mon, 27 Jan 2025 17:53:21 +0800	[thread overview]
Message-ID: <20250127095321.68588-1-yuntao.wang@linux.dev> (raw)

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


                 reply	other threads:[~2025-01-27  9:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250127095321.68588-1-yuntao.wang@linux.dev \
    --to=yuntao.wang@linux.dev \
    --cc=dvernet@meta.com \
    --cc=frederic@kernel.org \
    --cc=haoluo@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=pmladek@suse.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=zhangwarden@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox