From nobody Wed Dec 17 07:30:15 2025 Received: from m16.mail.163.com (m16.mail.163.com [117.135.210.4]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 93B2825178D for ; Wed, 19 Mar 2025 09:07:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=117.135.210.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742375260; cv=none; b=sAfRAlU7HnSljswWNMIE5xCRkk4BGclZjtGG454NXTJfoZHURVcyhA1cs2j0Xw8TJltHwVnrpx8h0uSER8kfrh35xVp1tCbFUbT+j5uVfsOdIHgYDo8fA2J8bGwEi3bqP9/1aarWE17ad0tF5DzXPgUJj4HE7fSyp1wQJSAKrFM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742375260; c=relaxed/simple; bh=5URbDiaZl8biD7TDajd8O40GLV+pSBfz7MbkvzF/5IE=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=KB/gmdvLISjCC0eqkNd4PzQUzn8dxI+6lRQlxCUNA/GFJaRws91eSOFW3qIdVRuT12RDthvEITq7gkWLrEVtt6DTEs4KJgdgrUlXCp5miyPStbBBGRCKjB0gCYndPWyT+shj87Ho32iS2ACAYQYKs02YmZrcoYCeivpJcHAvUlA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com; spf=pass smtp.mailfrom=163.com; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b=SC+1TGEy; arc=none smtp.client-ip=117.135.210.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=163.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=163.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=163.com header.i=@163.com header.b="SC+1TGEy" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=lNjTe 3Zo3VdidNMJkiMzeRJy9FgxAcYxL6SbtvlWNN8=; b=SC+1TGEy+ZsJa9Nsa802R 1u7s7r7BDDIPDBYw3JAFg1/ptIeetfaBeeFtYynD18Jubh/7c/aTnF6ffvyQl1i4 NbafDpLUuVLB0pqHKVx2Sd3z/eZU6MOsnL+3h6lA1wfMIA5b4bkFB/KSw80RZpJX gQ4/xMUHq0Y9hZkXzLBzfE= Received: from localhost.localdomain (unknown [223.70.253.31]) by gzsmtp5 (Coremail) with SMTP id QCgvCgAXYaZGidpnJGiERg--.39703S2; Wed, 19 Mar 2025 17:07:19 +0800 (CST) From: Liu Ye To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Liu Ye Subject: [PATCH v3] mm/page_alloc: Remove unnecessary __maybe_unused in order_to_pindex() Date: Wed, 19 Mar 2025 17:06:58 +0800 Message-Id: <20250319090658.394633-1-liuyerd@163.com> X-Mailer: git-send-email 2.25.1 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-CM-TRANSID: QCgvCgAXYaZGidpnJGiERg--.39703S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKrWrtF4UCrWkAw4fCrWUtwb_yoWDGrg_u3 WUKrs29r98urn5GwsrCanIgw4ft3WkCrn7GFn3Wr13ta42qFW2vw48A3y3AFn8WrW29FWr Wa1qqFW7Gw1agjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnqQ6JUUUUU== X-CM-SenderInfo: 5olx5vlug6il2tof0z/1tbiEAIVTGfagzNuhgABsv Content-Type: text/plain; charset="utf-8" From: Liu Ye From: Liu Ye The `movable` variable is always used when `CONFIG_TRANSPARENT_HUGEPAGE` is enabled, so the `__maybe_unused` attribute is not necessary. This patch removes it and keeps the variable declaration within the `#ifdef` block for better clarity. Signed-off-by: Liu Ye --- V3: Update from. V2: Update from and Signed-off-by. --- --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 542d25f77be8..fe76fd237dd0 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -508,9 +508,9 @@ static void bad_page(struct page *page, const char *rea= son) =20 static inline unsigned int order_to_pindex(int migratetype, int order) { - bool __maybe_unused movable; =20 #ifdef CONFIG_TRANSPARENT_HUGEPAGE + bool movable; if (order > PAGE_ALLOC_COSTLY_ORDER) { VM_BUG_ON(order !=3D HPAGE_PMD_ORDER); =20 --=20 2.25.1