From nobody Wed Dec 17 07:30:54 2025 Received: from m16.mail.163.com (m16.mail.163.com [220.197.31.4]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 376282AEE2 for ; Wed, 19 Mar 2025 09:00:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.197.31.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742374829; cv=none; b=dFLvN+HDX51/j7uAHY9uFxB6eZjK/5I75ia+IHCG4FXyrdp/MfkOMSYMcgl8CWz5vY311t5Xc8DDBR5O/zX3Sd/yVhAhQsUcFMFWfVD0fwyKFvYamdw4bsTvkyLdRVB10MWCVjPvhCWzZvhqTk5J/iKsEnmqNLfs3gJZUjedaD0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1742374829; c=relaxed/simple; bh=o/DwjLwBeyHWppk/kzjejchkvG5Z6FbweZaFSqjUV4Y=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=lgk6+RjZZWA2LL+zuswHXhXnFF2AaPeXp+axXXySBL4qTw96EBUnPLxso07wDe5PIsFJHjYxq6vh32Wlb08mTG/9lPqTnD51fxQU70A0nujGegjdiCD8VSRRMgLEpc8pkwKeuMGVrbu3Wf1U9tQJWJmm/4crNRXH/e0n87WY2tI= 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=DBbq1CTr; arc=none smtp.client-ip=220.197.31.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="DBbq1CTr" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=rbiMc zqE1kEPPcuWwzMJFBRrEV3cexuWl26w1yN+L6s=; b=DBbq1CTraB6nqy/yyNcdL uW9XxW710fOqa4XccJETWWfi5bnPM7s1MWw2YTyNt2pDUyF8QIF0tfzGr0w4OPA7 87nY7jj8/yq7UWJXZ8DCfIBQml3oRrANm/lQLMClF5b6JRAQ4WR+mbWrXfUsD2B7 OeRIgVJ8FnYW2YTbVVdmYo= Received: from localhost.localdomain (unknown []) by gzga-smtp-mtada-g1-2 (Coremail) with SMTP id _____wDX7taVh9pnVNm+AQ--.29185S2; Wed, 19 Mar 2025 17:00:05 +0800 (CST) From: Liu Ye To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Liu Ye Subject: [PATCH v2] mm/page_alloc: Remove unnecessary __maybe_unused in order_to_pindex() Date: Wed, 19 Mar 2025 17:00:03 +0800 Message-Id: <20250319090003.392988-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: _____wDX7taVh9pnVNm+AQ--.29185S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrKrWrtF4UCrWkAw4fCrWUtwb_yoWfKwb_u3 Wakrs29r9xur95KwsrCanIgw4ft3WkCrn7KFn3Wr13ta42qFW2vw48A3y3Arn8WrWI9FW5 Wan0qFW7Gw1agjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IUnqXdUUUUUU== X-CM-SenderInfo: 5olx5vlug6il2tof0z/1tbiEAIVTGfagzNuhgAAsu 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 --- 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