From 3c159bd91056d4c0440cfbf66394fd254735b783 Mon Sep 17 00:00:00 2001 From: shaomingyin Date: Tue, 27 May 2025 10:46:07 +0800 Subject: [PATCH] =?UTF-8?q?anolis:=20mm:=20fix=20unused=20variable=20?= =?UTF-8?q?=E2=80=98pmd=E2=80=99=20warning?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ANBZ: #20641 When CONFIG_FS_DAX_PMD is set to 'n', the compilation will generate the following warning. To eliminate the warning, declare variable pmd with __maybe_unused. mm/memory.c: In function ‘fr_apply_vma’: mm/memory.c:7310:8: error: unused variable ‘pmd’ [-Werror=unused-variable] pmd_t pmd; Signed-off-by: Shao Mingyin --- mm/memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/memory.c b/mm/memory.c index 1870f34a7981..d07f3f53348c 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -7386,7 +7386,7 @@ static void fr_apply_vma(struct vm_area_struct *vma) unsigned long next; spinlock_t *pml; pmd_t *pmdp = NULL; - pmd_t pmd; + pmd_t __maybe_unused pmd; bool applied = false; do { -- Gitee