From: Liu Ye <liuyerd@163.com>
To: akpm@linux-foundation.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Liu Ye <liuye@kylinos.cn>
Subject: [PATCH v4] mm/page_alloc: Remove unnecessary __maybe_unused in order_to_pindex()
Date: Wed, 19 Mar 2025 17:17:26 +0800 [thread overview]
Message-ID: <20250319091726.401158-1-liuyerd@163.com> (raw)
From: Liu Ye <liuye@kylinos.cn>
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<liuye@kylinos.cn>
---
V4: Update from.
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 *reason)
static inline unsigned int order_to_pindex(int migratetype, int order)
{
- bool __maybe_unused movable;
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
+ bool movable;
if (order > PAGE_ALLOC_COSTLY_ORDER) {
VM_BUG_ON(order != HPAGE_PMD_ORDER);
--
2.25.1
reply other threads:[~2025-03-19 9:17 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=20250319091726.401158-1-liuyerd@163.com \
--to=liuyerd@163.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuye@kylinos.cn \
/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