Skip to content

Commit 0a1e082

Browse files
Liu Yeakpm00
authored andcommitted
mm/page_alloc: remove unnecessary __maybe_unused in order_to_pindex()
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. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Liu Ye<[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent d893aca commit 0a1e082

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mm/page_alloc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -509,9 +509,9 @@ static void bad_page(struct page *page, const char *reason)
509509

510510
static inline unsigned int order_to_pindex(int migratetype, int order)
511511
{
512-
bool __maybe_unused movable;
513512

514513
#ifdef CONFIG_TRANSPARENT_HUGEPAGE
514+
bool movable;
515515
if (order > PAGE_ALLOC_COSTLY_ORDER) {
516516
VM_BUG_ON(order != HPAGE_PMD_ORDER);
517517

0 commit comments

Comments
 (0)