summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuacai Chen <chenhuacai@loongson.cn>2025-05-04 10:10:54 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-05-05 10:59:01 +0200
commit8b4c07bb511c6e565daa85d27c6681eafcd84d76 (patch)
treedbfe2afba6d715fd31d4ccc02833d7bc3f067483
parentb6736e03756f42186840724eb38cb412dfb547be (diff)
LoongArch: Fix build error due to backport
In 6.1 there is no pmdp_get() definition, so use *pmd directly, in order to avoid such build error due to a recently backport: arch/loongarch/mm/hugetlbpage.c: In function 'huge_pte_offset': arch/loongarch/mm/hugetlbpage.c:50:25: error: implicit declaration of function 'pmdp_get'; did you mean 'ptep_get'? [-Wimplicit-function-declaration] 50 | return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd; | ^~~~~~~~ | ptep_get Reported-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/f978ec9a-b103-40af-b116-6a9238197110@roeck-us.net Signed-off-by: Huacai Chen <chenhuacai@loongson.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--arch/loongarch/mm/hugetlbpage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/loongarch/mm/hugetlbpage.c b/arch/loongarch/mm/hugetlbpage.c
index cf3b8785a921..70b4a51885c2 100644
--- a/arch/loongarch/mm/hugetlbpage.c
+++ b/arch/loongarch/mm/hugetlbpage.c
@@ -47,7 +47,7 @@ pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr,
pmd = pmd_offset(pud, addr);
}
}
- return pmd_none(pmdp_get(pmd)) ? NULL : (pte_t *) pmd;
+ return pmd_none(*pmd) ? NULL : (pte_t *) pmd;
}
/*