From nobody Thu Jan 30 19:12:32 2025 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8FB8425A63B for ; Mon, 27 Jan 2025 09:55:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737971711; cv=none; b=HTQtwzIzw3Cl9lQhXetQaizz+pb+TdPDKy+d6D+fMxP/aQtWY+JrLSvf9jyTZwxl9bcKfjzTiKN8UNPArZ3RFdSR/6wQUFwgD+6JBWCzud0vA5GHSWwz/OS/Jrp0T1Xa4TPy3oePWL5taDBfzRA2IUZ2tX1SCK2D1oKgWN5U14E= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737971711; c=relaxed/simple; bh=noVcXv+LTkus8cbPxhwrq/aAlUVB/34L0NDc76eet/M=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OR+1EQFlsb1qgWJN7Q5AAFABrGjQBQmJ/ntgTsI1i9F4+MAZouy/ULrAtgUEDSERik+57MaA3pHfVKOUmhcYXkIEMZCxo8jncR97tGHstSjKNM0xvgUF+gOe7X5lk0VmU3PEODyQkoeDRuk11kwSzlmWo+nStEV6QA9WKWKxlYA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=e//LBOHo; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="e//LBOHo" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1737971706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ejc16/JuOr70XbjMX1wEpAqzCag5fQmu+aGkCHBrnjc=; b=e//LBOHoBNiEG0e13G/PHCZ6oQHQcSSSwV5YJiQdNzE40ah7r8P58R+diX7CGxANzXP6ed pCz/4I2y5/YNzqLbSjBylZFtdDrSHYHVytqLHzn8t6qub0xJMCfJJinP8PKUgH+64/CN0N xHAjW0TLd5UTs345WE5MxCnm1VBB9QU= From: Yuntao Wang To: linux-kernel@vger.kernel.org Cc: Tejun Heo , Frederic Weisbecker , Thomas Gleixner , Petr Mladek , Hao Luo , David Vernet , "Paul E. McKenney" , Wardenjohn , Yuntao Wang Subject: [PATCH] init_task: Use the existing DEFAULT_PRIO macro instead of open-coding it Date: Mon, 27 Jan 2025 17:53:21 +0800 Message-ID: <20250127095321.68588-1-yuntao.wang@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" 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 --- 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) = =3D { .stack =3D init_stack, .usage =3D REFCOUNT_INIT(2), .flags =3D PF_KTHREAD, - .prio =3D MAX_PRIO - 20, - .static_prio =3D MAX_PRIO - 20, - .normal_prio =3D MAX_PRIO - 20, + .prio =3D DEFAULT_PRIO, + .static_prio =3D DEFAULT_PRIO, + .normal_prio =3D DEFAULT_PRIO, .policy =3D SCHED_NORMAL, .cpus_ptr =3D &init_task.cpus_mask, .user_cpus_ptr =3D NULL, --=20 2.47.1